OS Manuals

/usr/bin/php

PHP 8.3 ZTS CLI binary

From php-8.3-frankenphp-cli 8.3.36-r1 (enterprise-packages), captured 2026-11-08 by running php --help (exit 0). permalink

Usage: php [options] [-f] <file> [--] [args...]
   php [options] -r <code> [--] [args...]
   php [options] [-B <begin_code>] -R <code> [-E <end_code>] [--] [args...]
   php [options] [-B <begin_code>] -F <file> [-E <end_code>] [--] [args...]
   php [options] -S <addr>:<port> [-t docroot] [router]
   php [options] -- [args...]
   php [options] -a

  -a               Run as interactive shell (requires readline extension)
  -c <path>|<file> Look for php.ini file in this directory
  -n               No configuration (ini) files will be used
  -d foo[=bar]     Define INI entry foo with value 'bar'
  -e               Generate extended information for debugger/profiler
  -f <file>        Parse and execute <file>.
  -h               This help
  -i               PHP information
  -l               Syntax check only (lint)
  -m               Show compiled in modules
  -r <code>        Run PHP <code> without using script tags <?..?>
  -B <begin_code>  Run PHP <begin_code> before processing input lines
  -R <code>        Run PHP <code> for every input line
  -F <file>        Parse and execute <file> for every input line
  -E <end_code>    Run PHP <end_code> after processing all input lines
  -H               Hide any passed arguments from external tools.
  -S <addr>:<port> Run with built-in web server.
  -t <docroot>     Specify document root <docroot> for built-in web server.
  -s               Output HTML syntax highlighted source.
  -v               Version number
  -w               Output source with stripped comments and whitespace.
  -z <file>        Load Zend extension <file>.

  args...          Arguments passed to script. Use -- args when first argument
                   starts with - or script is read from stdin

  --ini            Show configuration file names

  --rf <name>      Show information about function <name>.
  --rc <name>      Show information about class <name>.
  --re <name>      Show information about extension <name>.
  --rz <name>      Show information about Zend extension <name>.
  --ri <name>      Show configuration for extension <name>.
Options (62)
OptionDescriptionSource
-aRun as interactive shell (requires readline extension)help + man
-nNo configuration (ini) files will be usedhelp + man
-d foo[=barDefine INI entry foo with value 'bar'help + man
-eGenerate extended information for debugger/profilerhelp + man
-f fileParse and execute <file>.help + man
-hThis helphelp + man
-iPHP information and configurationhelp + man
-lSyntax check only (lint)help + man
-mShow compiled in moduleshelp + man
-r codeRun PHP <code> without using script tags <?..?>help + man
-B begin_codeRun PHP <begin_code> before processing input lineshelp + man
-R codeRun PHP <code> for every input linehelp + man
-F fileParse and execute <file> for every input linehelp + man
-E end_codeRun PHP <end_code> after processing all input lineshelp + man
-HHide script name (file) and parameters (args...) from external tools.help + man
-t docrootSpecify the document root to be used by the built-in web serverhelp + man
-sOutput HTML syntax highlighted source.help + man
-vVersion numberhelp + man
-wOutput source with stripped comments and whitespace.help + man
-z fileLoad Zend extension <file>.help + man
--iniShow configuration file nameshelp + man
--rf namename Shows information about function namehelp + man
--rc namename Shows information about class namehelp + man
--re namename Shows information about extension namehelp + man
--rz namename Shows information about Zend extension namehelp + man
--ri namename Shows configuration for extension namehelp + man
--interactive (in the manual page but not in --help)man
--bindpath address:port|port (in the manual page but not in --help)man
-b address:port|portBind Path for external FASTCGI Server mode (CGI only). (in the manual page but not in --help)man
--no-chdir (in the manual page but not in --help)man
-CDo not chdir to the script's directory (CGI only). (in the manual page but not in --help)man
--no-header (in the manual page but not in --help)man
-qQuiet-mode. (in the manual page but not in --help)man
--timing count (in the manual page but not in --help)man
-T countMeasure execution time of script repeated count times (CGI only). (in the manual page but not in --help)man
--php-ini path|file (in the manual page but not in --help)man
-c path|fileLook for php.ini file in the directory path or use the specified file (in the manual page but not in --help)man
--no-php-ini (in the manual page but not in --help)man
--define foo[=bar (in the manual page but not in --help)man
--file file (in the manual page but not in --help)man
--help (in the manual page but not in --help)man
--hide-args (in the manual page but not in --help)man
--info (in the manual page but not in --help)man
--syntax-check (in the manual page but not in --help)man
--modules (in the manual page but not in --help)man
--run code (in the manual page but not in --help)man
--process-begin code (in the manual page but not in --help)man
--process-code code (in the manual page but not in --help)man
--process-file file (in the manual page but not in --help)man
--process-end code (in the manual page but not in --help)man
--syntax-highlight (in the manual page but not in --help)man
--server addr:port (in the manual page but not in --help)man
-S addr:portStart built-in web server on the given local address and port (in the manual page but not in --help)man
--docroot docroot (in the manual page but not in --help)man
--version (in the manual page but not in --help)man
--strip (in the manual page but not in --help)man
--zend-extension file (in the manual page but not in --help)man
--rfunctionname (in the manual page but not in --help)man
--rclassname (in the manual page but not in --help)man
--rextensionname (in the manual page but not in --help)man
--rzendextensionname (in the manual page but not in --help)man
--rextinfoname (in the manual page but not in --help)man

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.