Hm, thinking a little more about this one:

> > function &getstuff($in)
> > {
> >   if ($in=='ok')
> >     return new MyObject();
> >   else
> >     return false; // this is the common line
> > }

"return false" (or null) is trying to return a reference to a literal,
which is (of course) questionable.

"new fooclass()" is *not* a literal but something that *can* and
*should* be referenced: see
http://www.php.net/manual/en/language.references.whatdo.php.

So at least "return /* byref*/ new ..." should be something that works
without a notice.

Matthias

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to