1. Go to this page and download the library: Download azjezz/psl library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
use Psl\Async;
use Psl\TCP;
use Psl\IO;
Async\main(static function(): int {
$server = TCP\listen('127.0.0.1', 8080);
IO\write_error_line('Listening on :8080');
while (true) {
$conn = $server->accept();
Async\run(static function() use ($conn) {
$conn->writeAll("Hello!\n");
$conn->close();
})->ignore();
}
});
shell
composer
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.