PHP 8 · Command line Run a one-line command Run PHP code without a file. php -r "echo PHP_VERSION, PHP_EOL;" Official PHP 8 documentation More command line commands Check the PHP versionStart a development serverServe a public folder with a router scriptRun a scriptCheck a file for syntax errorsList loaded extensions All command line commands · PHP 8 cheatsheet ← Run a scriptCheck a file for syntax errors →