- Service
If you are looking for an easy start for your PHP Service. Then this PHP Class is for you.
Sure!
This software is distributed under the GNU General Public License v3.0 license. Please read LICENSE for information on the software availability and distribution.
- PHP >= 8.0
Please disclose any vulnerabilities found responsibly – report security issues to the maintainers privately.
Using Composer:
composer require laswitchtech/php-service
#!/usr/bin/env php
session_start();
//Import phpCLI class into the global namespace
//These must be at the top of your script, not inside a function
use LaswitchTech\phpCLI\phpCLI;
//Load Composer's autoloader
require 'vendor/autoload.php';
// Interpret Standard Input
if(defined('STDIN') && !empty($argv)){
// Start Command
new phpCLI($argv);
}