register_argc_argv

INIINI default value changed in 8.5

register_argc_argv — This directive determines whether PHP registers $argv & $argc each time it runs. $argv contains an array of all the arguments passed to PHP when a script is invoked. $argc contains an integer representing the number of arguments that were passed when the script was invoked. These arrays are extremely useful when running scripts from the command line. When this directive is enabled, registering these variables consumes CPU cycles and memory each time a script is executed. For security reasons, this feature should be disabled for non-CLI SAPIs. Note: This directive is ignored for the CLI SAPI This directive is deprecated.

Default value Off
Development value Off
Production value Off

Modifiability: INI_PERDIR|INI_SYSTEM - The register_argc_argv INI directive can be set per-directory (php.ini, .htaccess, httpd.conf, .user.ini, etc.) or globally from php.ini files. However, it cannot be configured with ini_set calls.

PHP 5
PHP 7
PHP 8.0-8.1
PHP 8.2-8.3
PHP 8.4
PHP 8.5
Changed
PHP 8.6
register_argc_argv = 0

Changes to the register_argc_argv INI

PHP 8.5

  • INI directive default value changed from 1 to 0

register_argc_argv INI Availability

PHP VersionAvailability
PHP 8.6Upcoming Release Yes
PHP 8.5Supported (Latest) Yes
PHP 8.4Supported Yes
PHP 8.3Security-Fixes Only Yes
PHP 8.2Security-Fixes Only Yes
PHP 8.1Unsupported Yes
PHP 8.0Unsupported Yes
PHP 7.4Unsupported Yes
PHP 7.3Unsupported Yes
PHP 7.2Unsupported Yes
PHP 7.1Unsupported Yes
PHP 7.0Unsupported Yes
PHP 5.6Unsupported Yes
PHP 5.5Unsupported Yes
PHP 5.4Unsupported Yes
PHP 5.3Unsupported Yes