Bug #66068 [Fbk]: Random ASCII Mode Behavior in PCRE
| From: | rasmus@php.net | Date: | Fri, 08 Nov 2013 20:21:36 +0000 |
| Subject: | Bug #66068 [Fbk]: Random ASCII Mode Behavior in PCRE | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-182670@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=66068&edit=1
ID: 66068
Updated by: rasmus@php.net
Reported by: miqrogroove at hotmail dot com
Summary: Random ASCII Mode Behavior in PCRE
Status: Feedback
Type: Bug
Package: *Regular Expressions
Operating System: All
PHP Version: 5.4.21
Block user comment: N
Private report: N
New Comment:
According to http://3v4l.org/aEugD every version of PHP all the
way back to 4.3.0 returns 0 for that line of code. But, this sounds more like a LOCALE issue, or
perhaps as Nikic suggests PHP being linked against some weirdly built libpcre.
So we are going to need a bit more info to do anything about this. From the systems that don't
return 0 get their full phpinfo() output.
Previous Comments:
------------------------------------------------------------------------
[2013-11-08 19:40:33] nikic@php.net
Please check whether all versions you tested this on use the bundled PCRE library. If you are using
an external library and it's configured in some non-standard way there is nothing we can do
about it.
------------------------------------------------------------------------
[2013-11-08 18:33:51] miqrogroove at hotmail dot com
Description:
------------
I'm working on a bug patch for WordPress. I am getting random results from the \s sequence in
PCRE depending on which computer I use. Tried getting another opinion from PCRE, and so far the
consensus is that it's some kind of PHP bug. See also http://bugs.exim.org/show_bug.cgi?id=1412
These computers are not all running latest versions... if there is a version issue I'd like to
know about that too.
Test script:
---------------
echo preg_match('/\s/', "\xA0");
Expected result:
----------------
0
Actual result:
--------------
Some computers say 0, some computers say 1.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=66068&edit=1