/hphp/test/zend/good/ext/pcre/tests/bug41638.php
PHP | 26 lines | 25 code | 1 blank | 0 comment | 0 complexity | 7021d9cbb9e7237afa8e82ab9092998a MD5 | raw file
Possible License(s): LGPL-2.1, BSD-2-Clause, BSD-3-Clause, MPL-2.0-no-copyleft-exception, MIT, LGPL-2.0, Apache-2.0
- <?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);
- }