PHP 8 · Command line Run a script Run a PHP file from the command line. php script.php Official PHP 8 documentation More command line commands Check the PHP versionStart a development serverServe a public folder with a router scriptRun a one-line commandCheck a file for syntax errorsList loaded extensions All command line commands · PHP 8 cheatsheet ← Serve a public folder with a router scriptRun a one-line command →