[pcre-dev] is this a BUG in PCRE 7.0 ?

Pàgina inicial
Delete this message
Autor: Rain Chen
Data:  
A: pcre-dev
Assumpte: [pcre-dev] is this a BUG in PCRE 7.0 ?
hi,
I may met a bug in PCRE 7.0.

PHP upgrade to 5.2.3, and it using PCRE Library Version => 7.0 18-Dec-2006

this version PCRE seems doesn't work well with PHP.

I met same problem with php5.2.1+PCRE 7.0 in FreeBSD 6.2, resolved by
downgrading PCRE to 6.7


Reproduce code:
---------------
<?php
$str = "repeater id='loopt' dataSrc=subject colums=2";
preg_match_all("/(['\"])((.*(\\\\\\1)*)*)\\1/sU",$str,$str_instead);

echo "<xmp>";
print_r($str_instead);
?>

Expected result:
----------------
<xmp>Array
(
    [0] => Array
        (
            [0] => 'loopt'
        )


    [1] => Array
        (
            [0] => '
        )


    [2] => Array
        (
            [0] => loopt
        )


    [3] => Array
        (
            [0] => loopt
        )


    [4] => Array
        (
            [0] =>
        )


)

Actual result:
--------------
<xmp>Array
(
    [0] => Array
        (
        )


    [1] => Array
        (
        )


    [2] => Array
        (
        )


    [3] => Array
        (
        )


    [4] => Array
        (
        )


)


I report to PHP dev team.But they thounght this is not the PHP's problem but
is PCRE.This why you got this mail.

detail report at :http://bugs.php.net/bug.php?id=41638