PHP Flags & Options
Server-side scripting language.All PHP pages
- php --ini: show which php.ini file is loadedphp --ini shows which php.ini file the PHP CLI loads and which extra .ini files it parses. How PHP finds php.ini, and why the web server may use another file.
- php -d: override a php.ini setting for one run (memory_limit, display_errors)php -d overrides a php.ini setting for one CLI run, such as memory_limit=-1 or display_errors=1. Precedence over php.ini, invalid values and web server limits.
- php -m: list loaded PHP extensions (check if an extension is installed)php -m lists the loaded PHP extensions. Check whether mbstring, intl or pdo_mysql is installed, see details with --ri and --re, and add a missing extension.
- php -S localhost:8000: start the built-in development web serverphp -S localhost:8000 starts the PHP built-in development web server: document root, router scripts, static files, the index.php fallback and common problems.