From: [EMAIL PROTECTED]
Operating system: Win32, Linux
PHP version: 4.1.2
PHP Bug Type: PCRE related
Bug description: PREG_SPLIT_DELIM_CAPTURE does not work
PREG_SPLIT_DELIM_CAPTURE does not work - preg_split() simply omits the
delimiters disregarding the flag.
The following line:
print_r(preg_split('/a/', 'mama', -1, PREG_SPLIT_DELIM_CAPTURE));
...returns:
Array
(
[0] => m
[1] => m
[2] =>
)
...just like without the last argument - while it should return:
Array
(
[0] => m
[1] => a
[2] => m
[3] => a
[4] =>
)
--
Edit bug report at http://bugs.php.net/?id=16512&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=16512&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=16512&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=16512&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=16512&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16512&r=support
Expected behavior: http://bugs.php.net/fix.php?id=16512&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=16512&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=16512&r=submittedtwice