summaryrefslogtreecommitdiff
path: root/ext/pcre/tests/preg_replace_callback_array2.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pcre/tests/preg_replace_callback_array2.phpt')
-rw-r--r--ext/pcre/tests/preg_replace_callback_array2.phpt13
1 files changed, 9 insertions, 4 deletions
diff --git a/ext/pcre/tests/preg_replace_callback_array2.phpt b/ext/pcre/tests/preg_replace_callback_array2.phpt
index f333d06dcb..679a4b0c54 100644
--- a/ext/pcre/tests/preg_replace_callback_array2.phpt
+++ b/ext/pcre/tests/preg_replace_callback_array2.phpt
@@ -5,7 +5,14 @@ preg_replace_callback_array() errors
$a = array();
$b = "";
-var_dump(preg_replace_callback_array(array("xx" => "s"), $a, -1, $b));
+
+try {
+ var_dump(preg_replace_callback_array(array("xx" => "s"), $a, -1, $b));
+} catch (\TypeError $e) {
+ echo $e->getMessage() . \PHP_EOL;
+}
+
+
var_dump($b);
function f() {
static $count = 1;
@@ -23,9 +30,7 @@ try {
echo "Done\n";
?>
--EXPECTF--
-Warning: preg_replace_callback_array(): 's' is not a valid callback in %spreg_replace_callback_array2.php on line %d
-array(0) {
-}
+'s' is not a valid callback
string(0) ""
Warning: preg_replace_callback_array(): No ending delimiter '/' found in %spreg_replace_callback_array2.php on line %d