Re: [PHP4BETA] calling by reference?
| From: | Andi Gutmans | Date: | Sun, 15 Aug 1999 18:11:43 +0000 |
| Subject: | Re: [PHP4BETA] calling by reference? | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-3440@lists.php.net to get a copy of this message | ||
It works for me. Make sure you're using beta 2 or even better the latest CVS version (of both libzend, tsrm, and php4).
Andi
At 02:07 PM 8/15/99 +0200, Sander Pilon wrote:
Is this desired behaviour? --> You have two functions taking a string pointer -------------- function foo(&$string) {--- Andi Gutmans <andi@zend.com> http://www.zend.com/bar($string);} function bar(&$string) {// replace some stuff in $string} $s = "hello, world!"; foo($s); --------------- The 'call by reference' does not seem to work properly if bar() was defined AFTER foo(), but it DOES work properly if bar() was defined BEFORE foo(). Note that in both cases the functions are executed. (no errors/warnings) Sander Pilon - President, 3DN.NET, Inc. http://www.3dnews.net http://www.3dn.net mail: sander@3dnews.net -- PHP 4 Beta