Skip to content

Commit 5c214fc

Browse files
committed
Add test for recursive __debugInfo()
This also got fixed by switching to object apply count.
1 parent 7c2fbdf commit 5c214fc

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

Zend/tests/recursive_debug_info.phpt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
--TEST--
2+
Test recursive __debugInfo() method
3+
--FILE--
4+
<?php
5+
6+
class Test {
7+
public function __debugInfo() {
8+
return [$this];
9+
}
10+
}
11+
12+
var_dump(new Test);
13+
14+
?>
15+
--EXPECT--
16+
object(Test)#1 (1) {
17+
[0]=>
18+
*RECURSION*
19+
}

0 commit comments

Comments
 (0)