A SAPI Library written in PHP.
$argv = ['foo', 'bar', '--baz'];
$sapi = new CLI($argv);
$input = $sapi->getInput();
$input->getArgs(); // ['foo', 'bar', '--baz']
$input->getArgsCount(); // 3
$input->read();
$input->readLine();
$input->readAll();
$output = $sapi->getOutput();
$output->write('My message...');
Install Composer if you don't already have it present on your system.
To install the library, run the following command and you will get the latest version:
$ composer require secondtruth/sapi
- You must have at least PHP version 7.4 installed on your system.