[TYPO3-core] RFC Feature #16189: Optimize stdWrap usage for TypoScript content element CLEARGIF

Jigal van Hemert jigal at xs4all.nl
Mon Nov 1 09:31:00 CET 2010


Hi,

On 1-11-2010 1:25, Steffen Kamper wrote:
>  From performance this operator isn't faster than if/else, it's only a
> shortcut and is processed the same.

Unless it's abused in a way like:
$var .= ($check == 0) ? 'whatever' : '';

In that case the concatenation of an empty string to a variable is much 
slower than:
if ($check == 0) {
   $var .= 'whatever';
}

There are some ternary-addicts out there who just use it whenever it's 
remotely possible ;-)

-- 
Kind regards / met vriendelijke groet,

Jigal van Hemert
skype:jigal.van.hemert
msn: jigal at xs4all.nl
http://twitter.com/jigalvh


More information about the TYPO3-team-core mailing list