An asynchronous I/O environment in pure PHP, in another words, it is a micro nodejs implementation in pure PHP
a simple HTTP server using the new HTTPD class
include "Plus.php";
use Plus\Frame;
$frame = new Frame;
$httpd = $frame->httpd();
$httpd->createServer(function($request, $response)
{
$response->writeHead(200, ["Content-Type" => "text/html"]);
$response->write("<!DOCTYPE 'html'>");
$response->write("<html>");
$response->write("<head>");
$response->write("<title>Welcome to Plus http daemon</title>");
$response->write("</head>");
$response->write("<body>");
$response->write("<h1>It works !!</h1>");
$response->write("</body>");
$response->write("</html>");
$response->end();
});
$httpd->listen(80);
$frame->run();
- added
id
property to theIOStream
class - added
HTTPD
class as our official HTTP Daemon
initialized