Re: Construct Request
| From: | Derick Rethans | Date: | Thu, 15 Apr 2004 19:54:01 +0000 |
| Subject: | Re: Construct Request | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-9219@lists.php.net to get a copy of this message | ||
On Thu, 15 Apr 2004, Jason Garber wrote:
> $_POST['CUST_ID'] = (int) isset_or_default($_POST['CUST_ID'], 0);
>
> I agree that it would be helpful not to evaluate the second parameter
> unless needed, which is why I originally proposed a language construct.
You'll need something more clever, because an undefined
key 'CUST_ID' in $_POST['CUST_ID'] will strill throw a warning, even if
you pass it to a language construct. Changing that behavior is not
trivial.
Derick