$ cd ~/public_html
$ php -S localhost:8000
shell_exec('ls');
// or
exec('ls');
just simply type
php -a
php -f /path/to/your/file.php
php -r "Print "Hello, World!";"
vendor/bin/phpstan analyse [options] [<paths>...]
To execute a php script, use the PHP Command Line interface(CLI) and specify the file name of the script in the following way:
php script.php