Re: Construct Request

From: Date: Thu, 15 Apr 2004 20:14:26 +0000
Subject: Re: Construct Request
References: 1 2 3 4 5 6 7  Groups: php.internals 
Request: Send a blank email to internals+get-9222@lists.php.net to get a copy of this message
I wrote this (I underlined the relevant parts for you):
You'll need something more clever, because an undefined key 'CUST_ID' in $_POST['CUST_ID'] will strill throw a
Consider this: ----------------------------------- <?php error_reporting(E_ALL); function setor(&$param, $default) {
        return (isset($param) ? $param : $default);
}
$x = setor($x, 10);    ///Should Produce an E_NOTICE
echo gettype($x) . ':' . $x . "\n"; ?> ----------------------------------- This DOES NOT produce an E_NOTICE like you said (notice the &). However, $param1 is defined and NULL inside the function, even though $x was not a defined variable outside the function?? ~Jason

« previous php.internals (#9222) next »