/hphp/test/zend/good/ext/pcre/tests/bug42298.php
PHP | 14 lines | 13 code | 1 blank | 0 comment | 0 complexity | 6bd3e3f4ddfb24cb0d5a974158a42486 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 = "A\xc2\xa3BC";
- $m = null;
- preg_match_all_with_matches('/\S\S/u', $str, inout $m);
- var_dump($m);
- preg_match_all_with_matches('/\S{2}/u', $str, inout $m);
- var_dump($m);
- $str = "A\xe2\x82\xac ";
- preg_match_all_with_matches('/\W\W/u', $str, inout $m);
- var_dump($m);
- preg_match_all_with_matches('/\W{2}/u', $str, inout $m);
- var_dump($m);
- }