PHP 5.0.3 E_STRICT question - returning NULL from reference returning function
| From: | Yermo Lamers | Date: | Sun, 06 Mar 2005 04:47:23 +0000 |
| Subject: | PHP 5.0.3 E_STRICT question - returning NULL from reference returning function | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-15270@lists.php.net to get a copy of this message | ||
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;
}
??
----------------------------------------------------------------------------
DTLink Software http://www.dtlink.com
Desktop Software and Web Applications
----------------------------------------------------------------------------