PHP 4.0 Bug #6233: references, assignment of references, re-referencing

From: Date: Fri, 18 Aug 2000 10:37:46 +0000
Subject: PHP 4.0 Bug #6233: references, assignment of references, re-referencing
Groups: php.dev 
Request: Send a blank email to php-dev+get-29383@lists.php.net to get a copy of this message
From: waldschrott@php.net Operating system: * PHP version: 4.0 Latest CVS (18/08/2000) PHP Bug Type: Scripting Engine problem Bug description: references, assignment of references, re-referencing Unfortunately there was no comment on the list, thus storing the results here for expert review... initial problem 1) If there´s an unnecessary copy between object creation (new foo;) and the assignment $x = ~ we sould remove this... solution 1) It doesn´t influence all my code replacing *all* function foo() with function &foo(), this let´s me believe that there´s an unnecessary copy again, what would the impact (currently) be, if all funtions return references? well and thus the & operator seems to have no function, because the = assignment operator cannot handle references and creates a copy (if I got stas´ comment right) If I´m not missing sth the & operator in function names has currently *no* effect and it would get an effect making the assignement capable of handling references problem 2) already known (unfortunately only be a small circle of persons= not documented), it´s not possible to re-reference foo($zoo); function foo(&$boo) { $boo2=new foo2; $boo =& $boo2; } afterwards $zoo,$boo2,$boo ought to be one

« previous php.dev (#29383) next »