Bug #68746 [Opn->Nab]: preg_split doesn't always split when it should
| From: | requinix@php.net | Date: | Mon, 05 Jan 2015 07:12:37 +0000 |
| Subject: | Bug #68746 [Opn->Nab]: preg_split doesn't always split when it should | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-189655@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=68746&edit=1
ID: 68746
Updated by: requinix@php.net
Reported by: mr_platelet+jin6vr at fastmail dot fm
Summary: preg_split doesn't always split when it should
-Status: Open
+Status: Not a bug
Type: Bug
Package: PCRE related
Operating System: FreeBSD
PHP Version: 5.4.36
Block user comment: N
Private report: N
New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions. Due to the volume
of reports we can not explain in detail here why your report is not
a bug. The support channels will be able to provide an explanation
for you.
Thank you for your interest in PHP.
Check the documentation for what the third argument is supposed to be.
Previous Comments:
------------------------------------------------------------------------
[2015-01-05 07:04:50] mr_platelet+jin6vr at fastmail dot fm
Description:
------------
I doubt it's relevant, but the following
is my `configure' command, as output by "php -i":
'./configure' '--prefix=/usr/local/php/5.4.36-nfsn1'
'--includedir=/usr/local/php/5.4.36-nfsn1/include/'
'--libdir=/usr/local/php/5.4.36-nfsn1'
'--mandir=/usr/local/php/5.4.36-nfsn1/man/'
'--with-config-file-path=/usr/local/php/5.4.36-nfsn1/etc/' '--disable-all'
'--with-openssl' '--disable-cgi' '--enable-cli'
'--enable-libxml' '--enable-xml' '--enable-simplexml'
'--enable-pdo' '--with-mysql=mysqlnd' '--with-pdo-mysql=mysqlnd'
'--with-mysqli=mysqlnd' '--with-pcre-regex=/usr/local'
'--with-pear=/usr/local/php/5.4.36-nfsn1/lib/'
Test script:
---------------
echo
count(
preg_split(
'@\s*\n\s*\n\s*@',
"aa bb\n\ncc dd\n \nee ff\n\n",
PREG_SPLIT_NO_EMPTY
)
),
"\n";
Expected result:
----------------
I expect the following to
be printed:
3
Actual result:
--------------
The following is printed:
1
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=68746&edit=1