You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
620 B

  1. --TEST--
  2. Test preg_match_all() function : error conditions
  3. --FILE--
  4. <?php
  5. /*
  6. * proto int preg_match_all(string pattern, string subject, array subpatterns [, int flags [, int offset]])
  7. * Function is implemented in ext/pcre/php_pcre.c
  8. */
  9. /*
  10. * Testing how preg_match_all reacts to being passed the wrong type of subpatterns array argument
  11. */
  12. echo "*** Testing preg_match_all() : error conditions ***\n";
  13. $regex = '/[a-z]/';
  14. $subject = 'string';
  15. var_dump(preg_match_all($regex, $subject, test));
  16. echo "Done";
  17. ?>
  18. --EXPECTF--
  19. Fatal error: Only variables can be passed by reference in %spreg_match_all_error3.php on line %d