Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
--TEST--
2
Bug #490  : Recursions not managed.
3
--SKIPIF--
4
<?php
5
if (version_compare(PHP_VERSION, '4.9.9', '<=')) print 'PHP 5 required';
6
?>
7
--FILE--
8
<?php
9
 
10
error_reporting(E_ALL);
11
require_once 'Var_Dump.php';
12
$vd = new Var_Dump(array('display_mode' => 'Text'));
13
 
14
class c_parent {
15
    function c_parent() {
16
        $this->myChild = new child($this);
17
        $this->myName = 'c_parent';
18
    }
19
}
20
class child {
21
    function child(& $c_parent) {
22
        $this->myParent = & $c_parent;
23
    }
24
}
25
 
26
echo $vd->toString(new c_parent());
27
 
28
?>
29
--EXPECTREGEX--
30
object\(c_parent\)(#[0-9]+ )?\(2\) {
31
  myChild => object\(child\)(#[0-9]+ )?\(1\) {
32
    myParent => object\(c_parent\)(#[0-9]+ )?\(2\) {
33
      myChild => object\(child\)(#[0-9]+ )?\(1\) {
34
        myParent => \*RECURSION\*
35
      }
36
      myName => string\(8\) c_parent
37
    }
38
  }
39
  myName => string\(8\) c_parent
40
}