[TYPO3-core] RFC: Feature Request #9656: Extend t3lib_div::trimExplode to limit the number of elements

Oliver Hader oliver at typo3.org
Tue Oct 28 13:52:30 CET 2008


Hi Ingmar,

Ingmar Schlecht schrieb:
> Hi Olly,
> 
> one more comment regarding this one:
> As trimExplode is a quite highly used function, for performance reasons
> I would propose to avoid the condition and always pass the limit
> parameter on to explode(), a default value of 0 has the same effect as a
> not-given parameter. Or make it NULL by default, that's what Eclipse
> says is the default $limit parameter of explode().
> 
> What do you think?

explode(',', 'item1,item2,item3', NULL) or explode(',',
'item1,item2,item3', 0) returns an array with a single array element.
So, this does not work...

olly
-- 
Oliver Hader
TYPO3 4.3 Release Manager


More information about the TYPO3-team-core mailing list