From: [EMAIL PROTECTED]
Operating system: Windows NT 5.0 build 2195
PHP version: 4.2.1
PHP Bug Type: Unknown/Other Function
Bug description: print_r recognizes recursive references badly
See the following script.
The depth of the print_r functions output is growing.
<?php
class A {
var $x = 1;
var $b = null;
function A() {
}
function setB(&$b) {
$this->b = &$b;
}
}
class B {
var $x = 2;
var $a = null;
function B() {
}
function setA(&$a) {
$this->a = &$a;
}
}
$a = new A();
$b = new B();
$a->setB($b);
$b->setA($a);
print_r($a);
$a->x = 3;
print_r($a);
$b->x = 4;
print_r($a);
?>
--
Edit bug report at http://bugs.php.net/?id=19845&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=19845&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=19845&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=19845&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=19845&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=19845&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=19845&r=support
Expected behavior: http://bugs.php.net/fix.php?id=19845&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=19845&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=19845&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=19845&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=19845&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=19845&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=19845&r=isapi