Hi Igor,

thanks for the patch, I think it is an idea worth considering. Except
that the proposed solution with executing array_filter() might be
enough. You ran into a situation where this became a bottleneck in your
code?

Am Samstag, den 06.12.2008, 00:21 -0200 schrieb Igor Feghali:
> Hello There,
> 
> I would like to propose a third argument to implode(), named
> skip_empty, that will cause empty elements to be ignored when
> generating the implode string. By empty I mean everything that
> converts to an empty string such as '', false, null, etc.

For consistency, if we decide to introduce that for implode(), we should
do it for explode() too.

php -r "var_dump(explode(',', 'foo,,bla'));"
array(3) {
  [0]=>
  string(3) "foo"
  [1]=>
  string(0) ""
  [2]=>
  string(3) "bla"
}

and

php -r "var_dump(explode(',', 'foo,,bla', true));"
array(2) {
  [0]=>
  string(3) "foo"
  [1]=>
  string(3) "bla"
}

Anyway, would you mind writing a proper RFC for the addition?

cu, Lars
-- 
   Jabber: [EMAIL PROTECTED]
   Weblog: http://usrportage.de

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil

Reply via email to