RE: [PHP4BETA] A quick clarification question about PHP4...
| From: | Andi Gutmans | Date: | Tue, 24 Aug 1999 14:55:41 +0000 |
| Subject: | RE: [PHP4BETA] A quick clarification question about PHP4... | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-3679@lists.php.net to get a copy of this message | ||
At 09:13 AM 8/24/99 +0100, Samuel Liddicott wrote:
-----Original Message----- From: Andi Gutmans [mailto:andi@zend.com] Sent: 24 August 1999 07:21 AM To: Jim Brain; Zend Subject: Re: [PHP4BETA] A quick clarification question about PHP4...It has nothing to do with the object_copies you mention. It's for the same reason why it works this way in C++. The compiler creates the space and initializes static variables at compile time and not run time.If all those can be passed, can someone give me an example of something that cannot be passed?function foo ($ar) {static $foo = $ar;} This wouldn't work anymore. Why? Would this work? function foo (&$ar) {static $foo = $ar;} or this function foo (&$ar) {static $foo = &$ar;} Has it got anything to do with those devious object-copies that take place?
[I really wish the current definition of "object" would be replaced with "pointer_to_object" so that passing objects by reference is the same as passing by value.Putting technical reasons aside. It would seriously break downwards compatibility with PHP 3.0. We want it to be easy for people to upgrade to PHP 4.0. This would just be too big of a difference. Andi --- Andi Gutmans <andi@zend.com> http://www.zend.com/