|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-12-14 14:07 UTC] yohgaki@php.net
[2001-12-14 14:08 UTC] yohgaki@php.net
[2002-12-06 19:32 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 03:00:01 2025 UTC |
When I'm triing to use a reference on $this into the constructor of a object, it's a copy of the reference which is passed. have a look to this sample. class A { var $value; var $pB; function A() { $this->Value = 100; } } class B { var $value; function B(&$aa) { $this->value = 200; $aa->pB = &$this; } } $aa = new A(); $bb = new B($aa); $bb->value = 50; echo var_dump($aa); there is no 50 in the repr?sentation of the var_dump function. I've looked in the doc if this limitation is sp?cified, but NO! Etienne