Re: loading classes and efficiency
| From: | Brad Pauly | Date: | Sat, 13 Sep 2003 20:29:15 +0000 |
| Subject: | Re: loading classes and efficiency | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-162521@lists.php.net to get a copy of this message | ||
On Sat, 2003-09-13 at 11:08, Curt Zirzow wrote:
> * Thus wrote daniel@electroteque.org (daniel@electroteque.org):
> > > function &create_object() {
> > > [..]
> > > }
> > >
> > > $some_object =& create_object('some_object');
> > >
>
> This line should be:
> $some_object = create_object('some_object');
>
> The use of & at calltime is deprecated and should only be used in
> the declaration of the functions:
> function &func_name(&$ref_var) { }
Wouldn't =& still be legal because you are assigning a reference of what
is returned? Would that make $some_object a reference to a reference? It
doesn't seem to raise an exception.
- Brad