[TYPO3-core] RFC: Avoid double checking of match-conditions
René Fritz
rene at typo3.org
Fri Feb 17 12:08:59 CET 2006
> NO:
> function workOnArray($a) {}
> $a = workOnArray($a);
I don't know if PHP is intelligent enough to detect the "reference usage".
> YES:
> function workOnArray(&$a) {}
> workOnArray($a);
We may should use more like this. The disadvantage of such function is that
you don't see easily that they do something with the value. A common naming
scheme for such functions would help.
> Of course you should take care when designing such a function if you really
> want to work on the array.
Agree
--
René Fritz
TYPO3 Association - Active Member
http://association.typo3.org/
More information about the TYPO3-team-core
mailing list