recursion_limit.phpt 546 B

1234567891011121314151617181920212223242526
  1. --TEST--
  2. PCRE Recursion limit
  3. --SKIPIF--
  4. <?php
  5. if (@preg_match_all('/\p{N}/', '0123456789', $dummy) === false) {
  6. die("skip no support for \p support PCRE library");
  7. }
  8. ?>
  9. --INI--
  10. pcre.jit=0
  11. pcre.recursion_limit=2
  12. --FILE--
  13. <?php
  14. var_dump(preg_match_all('/\p{Ll}(\p{L}((\p{Ll}\p{Ll})))/', 'aeiou', $dummy));
  15. var_dump(preg_last_error() === PREG_RECURSION_LIMIT_ERROR);
  16. var_dump(preg_match_all('/\p{Ll}\p{L}\p{Ll}\p{Ll}/', 'aeiou', $dummy));
  17. var_dump(preg_last_error() === PREG_NO_ERROR);
  18. ?>
  19. --EXPECT--
  20. bool(false)
  21. bool(true)
  22. int(1)
  23. bool(true)