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

Ingmar Schlecht ingmar at typo3.org
Tue Oct 28 06:26:32 CET 2008


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?

cheers
Ingmar


Oliver Hader schrieb:
> This is a SVN patch request.
> 
> Problem:
> With t3lib_div::trimExplode it's not possible to limit the number of
> elements that are returned.
> 
> Solution:
> The solution is to introduce a new argument $limit and to define
> trimExplode to behave similar to PHP's explode function.
> 
> Comments:
> This RFC is required by RFC #9625.
> 
> Bugtracker references:
> http://bugs.typo3.org/view.php?id=9656
> 
> Branch: Trunk
> 
> 
> olly
> 


-- 
Ingmar Schlecht
TYPO3 Association Active Member


More information about the TYPO3-team-core mailing list