php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #51575 S modifier causes preg_match to behave incorrectly
Submitted: 2010-04-16 19:29 UTC Modified: 2010-04-23 22:16 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: pretender at design dot ru Assigned:
Status: Not a bug Package: PCRE related
PHP Version: 5.2.13 OS:
Private report: No CVE-ID: None
 [2010-04-16 19:29 UTC] pretender at design dot ru
Description:
------------
With some UTF-8 letters of Cyrillic block preg_match behaves incorrectly with S 
modifier.

Test script:
---------------
<?=(preg_match('#Ф#uiS', 'ф') == preg_match('#Ф#ui', 'ф')) ? "passed" : "failed"?>

Expected result:
----------------
"passed"

Actual result:
--------------
"failed"

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-04-21 19:09 UTC] felipe@php.net
This is a probable PCRE lib bug. I've reported this issue to a open recent bug report: http://bugs.exim.org/show_bug.cgi?id=976
 [2010-04-23 22:16 UTC] felipe@php.net
-Status: Open +Status: Bogus
 [2010-04-23 22:16 UTC] felipe@php.net
Not a PHP bug.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Fri Jan 21 08:03:35 2022 UTC