Re: [PHP3] Re: [PHP4BETA] Re: [PHP3] OO
| From: | Zeev Suraski | Date: | Thu, 05 Aug 1999 05:02:37 +0000 |
| Subject: | Re: [PHP3] Re: [PHP4BETA] Re: [PHP3] OO | ||
| References: | 1 2 3 4 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-9545@lists.php.net to get a copy of this message | ||
At 02:48 05/08/99 , Chuck Hagenbuch wrote:
Quoting Zeev Suraski <zeev@zend.com>: PHP 4.0 (which is our development platform, we won't put in any changes into version 3.0 anyway) implements transparent reference counting for any and all values in the system. That means that when you do $a = $b, you will (almost) never trigger an actual data copy, but rather, increase the reference count of the value $b points to by 1, and make $a point to it as well. That means quite a few variables may end up pointing at the same value. To be more accurate, there's almost no value in PHP that won't get its reference count bumped to 2 or more during the execution of its containing script. I assume that there's something that recognizes that when you do: $a = $b; $a = substr($a, 1); or something similar, $a gets it's own value, and $b isn't actually changed?Of course. Zeev -- Zeev Suraski <zeev@zend.com> http://www.zend.com/ For a PGP public key, finger bourbon@netvision.net.il