#33984 [Bgs->Opn]: Reference problem

From: Date: Wed, 03 Aug 2005 18:43:31 +0000
Subject: #33984 [Bgs->Opn]: Reference problem
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-82903@lists.php.net to get a copy of this message
ID: 33984 User updated by: na at index20 dot ru Reported By: na at index20 dot ru -Status: Bogus +Status: Open Bug Type: Scripting Engine problem Operating System: Linux PHP Version: 4.4.0 New Comment: I'd like to see a little explanation of this problem. Sorry that wasting your time, but i can't find this 'feature' in documentation. Thanks. Previous Comments: ------------------------------------------------------------------------ [2005-08-03 20:33:21] derick@php.net Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php . ------------------------------------------------------------------------ [2005-08-03 20:25:46] na at index20 dot ru Description: ------------ See reproduce code. Reproduce code: --------------- <?php class A {} class RefTest { function RefTest() { $this->a = new A; $this->b =& $this->a; } } $rt = new RefTest(); var_dump($rt); ?> Expected result: ---------------- object(reftest)(2) { ["a"]=> object(a)(0) { } ["b"]=> &object(a)(0) { } } Actual result: -------------- object(reftest)(2) { ["a"]=> &object(a)(0) { } ["b"]=> &object(a)(0) { } } ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=33984&edit=1

« previous php.bugs (#82903) next »