1. Go to this page and download the library: Download skillberto/command-handler library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
skillberto / command-handler example snippets
--version
--version
...
$handler = new CommandHandler($output, "php ");
... or
$handler = new CommandHandler($output);
$handler->addPrefix("php ");
... then
$handler->add("--version");
$handler->execute();
$handler = new CommandHandler($output, "", 0.2);
... or
$handler = new CommandHandler($output);
$handler->setTimeout(0.2);
... then
$handler->addCommand(new Command("php --version", true, 0.3);
$handler->add('something');
$handler->execute();