1. Go to this page and download the library: Download autoframe/cli-tools 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/ */
autoframe / cli-tools example snippets
`AfrCliPromptMenu`
use Autoframe\CliTools\AfrCliPromptMenu;
if (!AfrCliPromptMenu::insideCli()) {
echo 'The script does not run inside CLI!' . PHP_EOL;
return;
}
$options = [
'Mercedes',
'Audi',
'Porsche',
];
$user_choice = AfrCliPromptMenu::promptMenu(
"Select your dream car",
$options,
$options[1]
);
print PHP_EOL . "You chose: '$user_choice'\n";