[dev] [commits] Horde branch master updated. 8fb392db7dd8fa42dd7a759be11b1628ee5a7e39
Michael M Slusarz
slusarz at horde.org
Sat Sep 10 14:27:01 UTC 2011
Quoting Jan Schneider <jan at horde.org>:
> Zitat von Michael M Slusarz <slusarz at horde.org>:
>
>> commit 4797d5ac1c99268d489462c06c1d0404f00d29fa
>> Author: Michael M Slusarz <slusarz at curecanti.org>
>> Date: Fri Sep 9 17:23:08 2011 -0600
>>
>> Some places where we can use references instead of copy-by-value
>>
>> framework/Mime/lib/Horde/Mime.php | 8 ++++----
>> framework/Mime/lib/Horde/Mime/Address.php | 2 +-
>> 2 files changed, 5 insertions(+), 5 deletions(-)
>
> This doesn't make sense. PHP does copy-on-write, so it doesn't
> matter if use references or copy-by-value. If you want to avoid
> copying the value into a new variable during the loop, you should
> rather loop over the keys instead (if those are really arrays, not
> iterators).
A further note:
These are example of PHP internals that should be (and are)
transparent to someone programming in the language. But the problem
is that the consequences of these internal decisions drastically
affect the performance of a particular script. The pro and con of a
high-level programming language.
It would be nice if there was a place where some of these internals
were documented as they relate to aiding in a PHP programmer. Does
anyone know of such a site (besides random scattered comments within
the PHP manual itself)?
michael
___________________________________
Michael Slusarz [slusarz at horde.org]
More information about the dev
mailing list