[TYPO3-core] RFC: Avoid double checking of match-conditions

Martin Kutschker Martin.Kutschker at blackbox.net
Fri Feb 17 09:53:20 CET 2006


Franz Holzinger <franz at fholzinger.com> writes on 
Fri, 17 Feb 2006 09:48:16 +0100 (MET):

> 
> 
> >You can enhance this by passing the big arrays only as references:
> >
> >function &matching($cc)
> >...
> >return &$cc;
> >
> >
> function &matching (&$cc)
> ...
> 
> return $cc;


The return is pointless. Or is this meant as kind of backwards-compatibilty? IMHO this should be avoided because it's a bit confusing and folks might be lured into doing tyring to assign the array once to often.

function workOnArray(&$a) {
...
}

function &createArray() {
$a = array)();
...
return $a;
}

Masi 



More information about the TYPO3-team-core mailing list