go to bug id or search bugs for
Somewhere in the last few weeks, preg_split changed so that specifiying a limit parameter of 0 returns the string to be split unchanged. Before that, 0 was seemingly treated as no limit, meaning that you could safely specify 0 as the limit argument in order to specify a flag as the fourth argument.
$foo = 'a|b|c|d';
$m = preg_split('/|/', $foo, 0);
will return everything in the same array, whereas if the limit argument is left off (or increased), the string gets split up. The behavior allowing 0 to be no limit should be returned, or another safe argument for limit that means no limit documented.
Add a Patch
Add a Pull Request
As far as I remember, 0 has never meant "no limit" - the value for that is -1. But the documentation does need to be updated.