/hphp/test/zend/good/ext/pcre/tests/bug41638.php
http://github.com/facebook/hiphop-php · PHP · 26 lines · 25 code · 1 blank · 0 comment · 0 complexity · 7021d9cbb9e7237afa8e82ab9092998a MD5 · raw file
- <?hh <<__EntryPoint>> function main(): void {
- $str = "repeater id='loopt' dataSrc=subject colums=2";
- $str_instead = null;
- preg_match_all_with_matches(
- "/(['\"])((.*(\\\\\\1)*)*)\\1/sU",
- $str,
- inout $str_instead,
- );
- print_r($str_instead);
- // these two are from Magnus Holmgren (extracted from a pcre-dev mailing list post)
- preg_match_all_with_matches(
- "/(['\"])((?:\\\\\\1|.)*)\\1/sU",
- $str,
- inout $str_instead,
- );
- print_r($str_instead);
- preg_match_all_with_matches(
- "/(['\"])(.*)(?<!\\\\)\\1/sU",
- $str,
- inout $str_instead,
- );
- print_r($str_instead);
- }