Re: Weird behaviour with references to objects...

From: Date: Fri, 08 Nov 2002 15:54:15 +0000
Subject: Re: Weird behaviour with references to objects...
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-123398@lists.php.net to get a copy of this message
One more: At 16:48 08.11.2002, Tim Molendijk spoke out and said: --------------------[snip]-------------------- > >This is not true in my case, because instead of doing: >function add(&$child) { ... } >I do: >function add($child) { ... } >and then call it with: >$this->add(&$child); > >This has the same result... As far as I know I doesn't matter whether you >put an ampersand before the variable in your function definition or your in >your function call. --------------------[snip]-------------------- True for now, but this is "officially deprecated". Functions or methods accepting a reference are required to be "prototyped" that way - this helps you not to "forget" to pass by reference. You really should modify your functions using reference parameters when declaring them, if you're using references... -- >O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/

« previous php.general (#123398) next »