& performance issues

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



all,

i have heard from various sources that using the & in php can at times be
costly, and therefore, it should not be used when it is not needed.  for
example, passing an array by reference because you think youre passing the
actual array is not a good idea.  only pass it by reference if a modified
version needs to be handed to the calling code via an actual parameter.
im also wondering about php4 code thats now running under 5; such as
function &returnObject() ...
$a =& new SomeClass() ...
lets suppose, for the sake of arguments, i have my hands on a codebase where
everything actually does count.  the code was php4 and is now transitioning
to 5.  does anybody know if there would be a performance gain in running the
whole thing through sed to try and strip out the unnecessary & characters ?
any empirical data?

thx,

-nathan

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux