Re: argv and argc on cliphp

From: Date: Tue, 07 Oct 2003 08:27:28 +0000
Subject: Re: argv and argc on cliphp
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-4713@lists.php.net to get a copy of this message
RL>> Andrei and I discussed this change and at the conceptual level at least RL>> $_SERVER should be populated with argc and argv if variables_order RL>> includes "S". If you have specifically configured your system to not RL>> create $_SERVER, then of course it shouldn't be there. The change was to RL>> always make argc and argv available in the CLI version regardless of the RL>> variables_order setting. As in, the CLI version will now always populate RL>> the global $argc and $argv variables. What I see just now is that argc/argv is never getting into the _SERVER. No wonder, since the code in php_variables.c looks like: if (PG(register_globals) || SG(request_info).argc) { /* register argc/argv into EG(symbol_table) */ } else if (!SG(request_info).argc) { /* register argc/argv into track_vars_array */ } Either I am missing something or this code is meaningless - why should track_vars_array be populated only when argc equals to 0? Maybe non-zero argc was the intent? -- Stanislav Malyshev, Zend Products Engineer stas@zend.com http://www.zend.com/ +972-3-6139665 ext.109

« previous php.internals (#4713) next »