[dev] [commits] Horde branch master updated. 8fb392db7dd8fa42dd7a759be11b1628ee5a7e39

Jan Schneider jan at horde.org
Sat Sep 10 10:24:01 UTC 2011


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).

Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/



More information about the dev mailing list