PageRenderTime 62ms CodeModel.GetById 22ms RepoModel.GetById 0ms app.codeStats 0ms

/hphp/test/zend/good/ext/pcre/tests/bug42298.php

http://github.com/facebook/hiphop-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
  1. <?hh <<__EntryPoint>> function main(): void {
  2. $str = "A\xc2\xa3BC";
  3. $m = null;
  4. preg_match_all_with_matches('/\S\S/u', $str, inout $m);
  5. var_dump($m);
  6. preg_match_all_with_matches('/\S{2}/u', $str, inout $m);
  7. var_dump($m);
  8. $str = "A\xe2\x82\xac ";
  9. preg_match_all_with_matches('/\W\W/u', $str, inout $m);
  10. var_dump($m);
  11. preg_match_all_with_matches('/\W{2}/u', $str, inout $m);
  12. var_dump($m);
  13. }