Just curious what is the techincal aspect of the such case. Why need NULL identifier for the return not NULL iteself.
----- Original Message ----- From: "Zeev Suraski" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[email protected]> Sent: Sunday, March 06, 2005 10:36 AM Subject: Re: [PHP-DEV] PHP 5.0.3 E_STRICT question - returning NULLfrom reference returning function > At 06:47 06/03/2005, Yermo Lamers wrote: > > >What is the proper way to return a NULL condition from a method that > >returns a reference? > > > >function &testfunc() > >{ > >return NULL; > >} > > > >generates: > > > >"Strict Standards: Only variable references should be returned by > >reference in ..." > > > >Is the correct approach to do something like: > > > >function &testfunc() > >{ > >$nullVar = NULL; > >return $nullVar; > >} > > That'd work, yep. > > Zeev > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
