1. Go to this page and download the library: Download irfantoor/command 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/ */
sh
php hello4.php hello -g Hi irfan
# or
php hello4.php hello --greeting "Hay you! cheers" man
sh
$ php hello4.php -h
# http://localhost:8000/hello4.php?args=-h
$ php hello4.php hello -g Hi irfan
# args as string:
# http://localhost:8000/hello4.php?args=hello%20-g%20Hi%20irfan
# args as array
# http://localhost:8000/hello4.php?args[]=hello&args[]=-g&args[]=Hi&args[]=irfan
# args must be used as array, when args values has spaces e.g.:
# http://localhost:8000/hello4.php?args[]=hello&args[]=-g&args[]=Hay%20You!&args[]=young%20man
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.