Re: [PHP-DEV] PHP 4.0 Bug #7511 Updated: References are not properly reassigned with classes From: André Langhorst (waldschrott <email protected>)
Date: 10/28/00

> 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 <email protected>   ˇ m: +49 173 9558736 ˇ
ˇ PHP Quality Assurance ˇ http://qa.php.net  ˇ

-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>