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

Martin Kutschker masi-no at spam-typo3.org
Tue Oct 28 09:33:00 CET 2008


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?

Make some measurements with test data. Use the fastest version and add a
comment that explains the solution.

Masi


More information about the TYPO3-team-core mailing list