PHP Classes

PHP Non Blocking CLI: Implement CLI scripts that do not block the output

Recommend this page to a friend!
  Info   View files Example   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2023-09-20 (3 days ago) RSS 2.0 feedNot yet rated by the usersTotal: 24 This week: 24All time: 10,981 This week: 6Up
Version License PHP version Categories
nb_cli 1.0BSD License8Console, PHP 8
Description 

Author

This package can implement CLI scripts that do not block the output.

It provides a class that can be extended to implement console-based command line interface (CLI) scripts to implement applications that do not block when they need to write the output or read the script's input.

This class can process the CLI parameters passed by the user to the script and call functions of plugin classes to process the parameters to execute the actions that need to be done to implement the parts of the hand.

Developers may write plugin classes that implement the actions for different events and own custom CLI scripts.

Internally, this class has a main loop that runs at a set speed. Each plugin can run at its speed within the speed of the main loop.

The input and output of the current script can be set to non-blocking, so the hand does not wait for the console to read data from the user input nor wait for the output to be displayed in the console.

Picture of JImmy Bo
  Performance   Level  
Name: JImmy Bo <contact>
Classes: 14 packages by
Country: United States United States
Innovation award
Innovation award
Nominee: 8x

Winner: 1x

  Files folder image Files  
File Role Description
Plain text file class.nb_cli_1.0.php Class PHP NonBlocking CLI - Plugin based non-blocking CLI class for PHP console programs
Accessible without login Plain text file test-cli.example.game.php Example RPG MUD-like dungeon adventure game example with NPCs and Entities
Accessible without login Plain text file test-cli.example.php Example Basic Example
Accessible without login Plain text file test-cli.example.sockets.php Example example multi user chat server using sockets running multiple chat servers at same time on different ports

 Version Control Unique User Downloads Download Rankings  
 0%
Total:24
This week:24
All time:10,981
This week:6Up