How to run a PHP script from a Unix command line
By Alvin Alexander. Last updated: October 2 2019
PHP FAQ: How can I run a PHP script from the Linux/Unix command line?
Solution: To run a PHP script from a Unix command line you can use this syntax:
php -f myscript.php