Re: Reference Notice

From: Date: Sun, 17 Jul 2005 22:06:09 +0000
Subject: Re: Reference Notice
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-17289@lists.php.net to get a copy of this message
It's a notice. Your soul won't curdle and fall out of your ears just because your code produces a notice which you can easily prevent from being output. Robert Cummings wrote: >I think the reference notice stuff is a bit ridiculous. I mean I can >understand the concern behind: > > function &foo() > { > return $fee.$fii; > } > >But I mean the following gives errors too which is a bit too anal >retentive even for my liking: > > function &foo() > { > $fee = 'bullshitBullshitBullshit'; > > return $fee; > } > > function &fee() > { > return foo(); > } > > fee(); > >Anyways my two cents. Seems moronic that I now need to worry about >stupid reference notices X levels deep in the code for functions that >I'm consuming. I gueeeeeeeeeeeeess I can assign return values EVERYWHERE >to temporary variables just to get rid of the notices, but really, >shouldn't the engine be happy enough returning references to it's own >intermediate variable? I mean, heck, the engine knows enough to print a >warning, it can do the work-- and a hell of a lot faster than developers >having to temporarily assign everything. > >Cheers, >Rob. > >

« previous php.internals (#17289) next »