ID: 16609 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Duplicate Bug Type: Class/Object related Operating System: Windows 2000, Windows XP PHP Version: 4.1.2 New Comment:
Duplicate submission. Sorry. Previous Comments: ------------------------------------------------------------------------ [2002-04-15 05:37:59] [EMAIL PROTECTED] There is the line marked with '//*' in the following script. One line up you will find other line that should make the exactly same action (I think). Try to comment this line and uncomment line with '//*'. The output will differ. Why? --- SCRIPT: START --- <PRE> <?php class test { function test() { extfunc($this); } } #__________________________________________________________________________________________________ function extfunc(&$ref) { global $obj; if (is_object($ref)) { $GLOBALS["obj"]=&$ref; # This is the same as '$obj=&$ref;'. Isn't it? #* $obj=&$ref; } } #================================================================================================== $test=new test(); var_dump($obj); ?> </PRE> --- SCRIPT: END --- ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=16609&edit=1