diff options
Diffstat (limited to 'ext/pcre/tests')
-rw-r--r-- | ext/pcre/tests/002.phpt | 9 | ||||
-rw-r--r-- | ext/pcre/tests/preg_replace_callback_array2.phpt | 2 |
2 files changed, 7 insertions, 4 deletions
diff --git a/ext/pcre/tests/002.phpt b/ext/pcre/tests/002.phpt index 073a7a8d56..641cffb05e 100644 --- a/ext/pcre/tests/002.phpt +++ b/ext/pcre/tests/002.phpt @@ -3,7 +3,11 @@ preg_* with bogus vals --FILE-- <?php -var_dump(preg_match_all('//', '', $dummy, 0xdead)); +try { + preg_match_all('//', '', $dummy, 0xdead); +} catch (ValueError $exception) { + echo $exception->getMessage() . "\n"; +} var_dump(preg_quote('')); @@ -13,8 +17,7 @@ var_dump(preg_replace('/(.)/e', 'for ($', 'abc')); ?> --EXPECTF-- -Warning: preg_match_all(): Invalid flags specified in %s002.php on line %d -NULL +preg_match_all(): Argument #4 ($flags) must be a PREG_* constant string(0) "" string(12) "a${1b${1c${1" diff --git a/ext/pcre/tests/preg_replace_callback_array2.phpt b/ext/pcre/tests/preg_replace_callback_array2.phpt index 679a4b0c54..aca11dc19c 100644 --- a/ext/pcre/tests/preg_replace_callback_array2.phpt +++ b/ext/pcre/tests/preg_replace_callback_array2.phpt @@ -30,7 +30,7 @@ try { echo "Done\n"; ?> --EXPECTF-- -'s' is not a valid callback +preg_replace_callback_array(): Argument #1 ($pattern) must contain only valid callbacks string(0) "" Warning: preg_replace_callback_array(): No ending delimiter '/' found in %spreg_replace_callback_array2.php on line %d |