Re: PHP 4.0 Bug #7511 Updated: References are not properly reassigned with classes

From: Date: Sat, 28 Oct 2000 20:15:08 +0000
Subject: Re: PHP 4.0 Bug #7511 Updated: References are not properly reassigned with classes
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-36276@lists.php.net to get a copy of this message
The problem is that it is not possible for the new operator to return a reference. The ability, I believe, needs to be there. The question is should it return a reference by default or only when explicitly requested. //example by default $joe = new foo(); //$joe will be populated with a reference to the instantiated foo class; //explicit example $joe =& new foo(); //$joe requests a reference to the new object.
hm, why should new return a reference? new returns the instance created, it can´t return something else, that would make no sense what do you expect to happen using the "explicit example"? I think you´re getting something wrong using references, but I could be wrong... regards, andré -- · André Langhorst · t: +49 331 5811560 · · waldschrott@php.net · m: +49 173 9558736 · · PHP Quality Assurance · http://qa.php.net ·

« previous php.dev (#36276) next »