Re: Construct Request
| From: | Andrey Hristov | Date: | Thu, 15 Apr 2004 21:35:14 +0000 |
| Subject: | Re: Construct Request | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-9238@lists.php.net to get a copy of this message | ||
Sean Coates wrote:
Jason Garber wrote:inside the function you have already a variable named $oink so there won't be a E_NOTICE for unknown var. The variable is "linked" to somewhere outside but that doesn't matter. I think it has in common with the unset() behaviour on variables visible with "global" keyword. Andreyfunction setor(&$param, $default) {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 So, how I see the code: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?