Jason Garber wrote:
function setor(&$param, $default)
{
    return (isset($param) ? $param : $default);
}

I tested it on 4.3.4 and 5.0 RC1, and it worked. Is passing an undefined variable as a reference parameter a legal thing to do in PHP?

That bring up an interesting point:


error_reporting(E_ALL);
function test_func(&$oink)
{
  echo $oink;
}
test_func($moo);


executing this block does not fire an E_NOTICE.


S

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



Reply via email to