summaryrefslogtreecommitdiff
path: root/ext/standard/tests/array/array_replace.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/tests/array/array_replace.phpt')
-rw-r--r--ext/standard/tests/array/array_replace.phpt24
1 files changed, 8 insertions, 16 deletions
diff --git a/ext/standard/tests/array/array_replace.phpt b/ext/standard/tests/array/array_replace.phpt
index 6ba9e43fd7..48b616ab04 100644
--- a/ext/standard/tests/array/array_replace.phpt
+++ b/ext/standard/tests/array/array_replace.phpt
@@ -42,11 +42,15 @@ $data = array_replace_recursive($array1, $array2);
var_dump($data);
echo " -- Testing array_replace_recursive() w/ endless recusrsion --\n";
-$data = array_replace_recursive($array3, $array4);
+try {
+ $data = array_replace_recursive($array3, $array4);
+ var_dump($data);
+} catch (\Error $e) {
+ echo $e->getMessage() . "\n";
+}
-var_dump($data);
?>
---EXPECTF--
+--EXPECT--
-- Testing array_replace() --
array(5) {
[0]=>
@@ -107,16 +111,4 @@ array(5) {
}
}
-- Testing array_replace_recursive() w/ endless recusrsion --
-
-Warning: array_replace_recursive(): recursion detected in %s on line %d
-array(1) {
- [0]=>
- array(1) {
- [0]=>
- array(1) {
- [0]=>
- array(0) {
- }
- }
- }
-}
+Recursion detected