CLI Always Provides argv and argc

The $argv and $argc variables are always available in the command-line version of PHP 5. This happens even if the register_argc_argv configuration setting is set to Off.

The $_SERVER superglobal variable also contains entries for $_SERVER['argv'] and $_SERVER['argc'] if your variables_order configuration directive contains an S to enable this variable.

Get Upgrading to PHP 5 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.