mirror of
https://github.com/php/php-src.git
synced 2025-01-26 21:54:16 +08:00
c449991a3e
#they pass here, but segfault on php 5.2/pcre 7.0
83 lines
1.2 KiB
PHP
83 lines
1.2 KiB
PHP
--TEST--
|
|
Bug #41638 (pcre 7.0 regression)
|
|
--FILE--
|
|
<?php
|
|
$str = "repeater id='loopt' dataSrc=subject colums=2";
|
|
|
|
preg_match_all("/(['\"])((.*(\\\\\\1)*)*)\\1/sU",$str,$str_instead);
|
|
print_r($str_instead);
|
|
|
|
// these two are from Magnus Holmgren (extracted from a pcre-dev mailing list post)
|
|
preg_match_all("/(['\"])((?:\\\\\\1|.)*)\\1/sU", $str, $str_instead);
|
|
print_r($str_instead);
|
|
|
|
preg_match_all("/(['\"])(.*)(?<!\\\\)\\1/sU", $str, $str_instead);
|
|
print_r($str_instead);
|
|
|
|
?>
|
|
--EXPECT--
|
|
Array
|
|
(
|
|
[0] => Array
|
|
(
|
|
[0] => 'loopt'
|
|
)
|
|
|
|
[1] => Array
|
|
(
|
|
[0] => '
|
|
)
|
|
|
|
[2] => Array
|
|
(
|
|
[0] => loopt
|
|
)
|
|
|
|
[3] => Array
|
|
(
|
|
[0] => t
|
|
)
|
|
|
|
[4] => Array
|
|
(
|
|
[0] =>
|
|
)
|
|
|
|
)
|
|
Array
|
|
(
|
|
[0] => Array
|
|
(
|
|
[0] => 'loopt'
|
|
)
|
|
|
|
[1] => Array
|
|
(
|
|
[0] => '
|
|
)
|
|
|
|
[2] => Array
|
|
(
|
|
[0] => loopt
|
|
)
|
|
|
|
)
|
|
Array
|
|
(
|
|
[0] => Array
|
|
(
|
|
[0] => 'loopt'
|
|
)
|
|
|
|
[1] => Array
|
|
(
|
|
[0] => '
|
|
)
|
|
|
|
[2] => Array
|
|
(
|
|
[0] => loopt
|
|
)
|
|
|
|
)
|