Le 15/05/2017 à 08:57, Nicolas Grekas a écrit :
> Hi,
> 
> in master, feature request https://bugs.php.net/61780 has been implemented
> and merged into master thanks to https://github.com/php/php-src/pull/1303

I think everyone agree that BC should be avoid, when possible.

Even if this one is quite small, and have been tried to be as small as
possible, it exists.

Dev time are designed to detect such issues as soon as possible,
so first, thanks for reporting.

IMHO, I think a new flag to enable the new feature seems the nicest way
to keep BC and offer the new feature/behavior.

> I'm not against reverting the commit,

Reverting the commit, will be a pity

> I suggest not to set unmatched subpatterns at all,

Can you give an example of expected output ?
(I think stable position for matched pattern is important)

php -r 'var_dump(preg_match("/(a)?([a-z]*)(\d*)/", "123", $matches),
$matches);'




Remi.

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to