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

All command line commands · PHP 8 cheatsheet

Was this page helpful?