1--TEST--
2Test recursive __debugInfo() method
3--FILE--
4<?php
5
6class Test {
7    public function __debugInfo() {
8        return [$this];
9    }
10}
11
12var_dump(new Test);
13
14?>
15--EXPECT--
16object(Test)#1 (1) {
17  [0]=>
18  *RECURSION*
19}
20