PageRenderTime 60ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 0ms

/hphp/test/zend/bad/ext/pcre/tests/preg_match_all_error3.php

http://github.com/facebook/hiphop-php
PHP | 14 lines | 7 code | 0 blank | 7 comment | 0 complexity | 930b41ef2c34d2e8357749be64c974ec 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. <?php
  2. /*
  3. * proto int preg_match_all(string pattern, string subject, array subpatterns [, int flags [, int offset]])
  4. * Function is implemented in ext/pcre/php_pcre.c
  5. */
  6. /*
  7. * Testing how preg_match_all reacts to being passed the wrong type of subpatterns array argument
  8. */
  9. echo "*** Testing preg_match_all() : error conditions ***\n";
  10. $regex = '/[a-z]/';
  11. $subject = 'string';
  12. var_dump(preg_match_all($regex, $subject, 'test'));
  13. echo "Done";
  14. ?>