]> granicus.if.org Git - php/commitdiff
Add test for recursive __debugInfo()
authorNikita Popov <nikic@php.net>
Wed, 15 Apr 2015 20:32:19 +0000 (22:32 +0200)
committerNikita Popov <nikic@php.net>
Wed, 15 Apr 2015 20:38:50 +0000 (22:38 +0200)
This also got fixed by switching to object apply count.

Zend/tests/recursive_debug_info.phpt [new file with mode: 0644]

diff --git a/Zend/tests/recursive_debug_info.phpt b/Zend/tests/recursive_debug_info.phpt
new file mode 100644 (file)
index 0000000..6667650
--- /dev/null
@@ -0,0 +1,19 @@
+--TEST--
+Test recursive __debugInfo() method
+--FILE--
+<?php
+
+class Test {
+    public function __debugInfo() {
+        return [$this];
+    }
+}
+
+var_dump(new Test);
+
+?>
+--EXPECT--
+object(Test)#1 (1) {
+  [0]=>
+  *RECURSION*
+}