Re: PHP 4.0 Bug #9029: preg_split inconsistency
| From: | Anil Madhavapeddy | Date: | Wed, 31 Jan 2001 15:36:23 +0000 |
| Subject: | Re: PHP 4.0 Bug #9029: preg_split inconsistency | ||
| References: | 1 2 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-45460@lists.php.net to get a copy of this message | ||
Quoting Andrei Zmievski <andrei@ispi.net>:
> I could add this functionality but I am not sure if it would break
> people's scripts because they used parentheses without expecting to
> receive captured delimiters. What does everyone think? Should it be that
> way by default or should we have another PREG_SPLIT flag, e.g.
> PREG_SPLIT_DELIM_CAPTURE? And if we have a flag can it be combined with
> PREG_SPLIT_NO_EMPTY?
Well, given that the aim of the function is to be as perl-compatible, it
would be nice to make this default behaviour. The breakage of any scripts
would be pretty easy to spot, if they did use brackets wrongly, so an entry in
NEWS ought to enough ?
--
Anil Madhavapeddy, <anil@recoil.org>