Re: "waldschrotts guide to nifty references" - manual page draft, version 0.9b
| From: | Stanislav Malyshev | Date: | Sat, 19 Aug 2000 21:46:21 +0000 |
| Subject: | Re: "waldschrotts guide to nifty references" - manual page draft, version 0.9b | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-29722@lists.php.net to get a copy of this message | ||
AL>> You╢re right, instead of that you╢re wrong in the point that
AL>> reference-counting does not affect the PHP programmers behaviour.
Yes it does not. In most cases you have no slightest idea of what
refereence count for which zval is, looking from user-space. And I mean
that. There's much more behind the scenes that is seen from PHP level. But
PHP user doesn't need to know that. In this case, ignorance is bliss.
AL>> This script does not copy the object 3 times, it just increases
ref-count by 3.
AL>>
AL>> $copy1=$mega_mature_object;
AL>> $copy2=$mega_mature_object;
AL>> $copy3=$mega_mature_object;
Mostly true, but I cannot guarantee copy won't happen somewhere later in
the script.
AL>> Perhaps it only affects <1% of the devs, but it╢s a relevant
AL>> issue while the zend api is not (for the manual).
There are and will be advanced articles (and books) for advanced
developers. Manual is just reference, not tutorial.
--
Stanislav Malyshev stas@zend.com
+972-3-6139665 ext.106