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
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