PHP Classes

Horus Plus: Process asynchronous I/O in pure PHP like Node.js

Recommend this page to a friend!
  Info   View files Documentation   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2024-01-10 (3 days ago) RSS 2.0 feedStarStarStarStar 69%Total: 481 This week: 4All time: 5,931 This week: 102Up
Version License PHP version Categories
horus-plus 1.9MIT/X Consortium ...5.3Networking, HTTP, PHP 5, Files and Fo..., L..., L...
Description 

Author

This package can process asynchronous I/O in pure PHP like Node.js.

It can register callback functions that are invoked when specific events occur.

The IOLoop class uses the libevent extension to add or remove streams of data or timers to watch and dispatch when relevant events occur.

The packages comes with classes for reading and writing from data streams like files, network sockets and pipes, as a well a dedicated class that works as HTTP server.

Innovation Award
PHP Programming Innovation award winner
April 2015
Winner


Prize: One downloadable e-book of choice by O'Reilly
Asynchronous programming can be more efficient to execute multiple tasks in parallel that need to wait for I/O operations like accessing files, databases or remote computers.

Node.js made asynchronous programming very popular. This package implements asynchronous programming support in pure PHP very similar to the way Node.js works.

Manuel Lemos
Picture of Mohammed Al Ashaal
  Performance   Level  
Name: Mohammed Al Ashaal <contact>
Classes: 8 packages by
Country: Egypt Egypt
Innovation award
Innovation award
Nominee: 2x

Winner: 1x

Documentation

 

Details

Plus

An asynchronous I/O environment in pure PHP, in another words, it is a micro nodejs implementation in pure PHP

Example:

> 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();

Changelog:

1.0.1

  • added `id` property to the `IOStream` class
  • added `HTTPD` class as our official HTTP Daemon

1.0

initialized


  Files folder image Files  
File Role Description
Accessible without login Plain text file LICENSE Lic. Auxiliary data
Plain text file Plus.php Class Class source
Accessible without login Plain text file README.md Doc. Auxiliary data
Accessible without login HTML file wiki.html Doc. Documentation

 Version Control Unique User Downloads Download Rankings  
 100%
Total:481
This week:4
All time:5,931
This week:102Up
 User Ratings  
 
 All time
Utility:100%StarStarStarStarStarStar
Consistency:100%StarStarStarStarStarStar
Documentation:93%StarStarStarStarStar
Examples:-
Tests:-
Videos:-
Overall:69%StarStarStarStar
Rank:457