Andi Gutmans wrote:
At 03:26 PM 2/17/2005 -0500, Daniel Convissor wrote:

On Thu, Feb 17, 2005 at 12:21:45PM -0800, Andi Gutmans wrote:
> Yeah I realize it's different but my idea was that if you have something
> like:
> filter_get(POST, "foo", FILTER_NUMBER) the semantics of this or some other
> function could be:
> if (isset($_POST["foo"]) && is_number(.....
>
> I think in most cases that would do and doesn't require to add/change
> opcodes and language constructs...


Yeah, but... what if one wants to call it on a variable that's not part of
the superglobals? Plus that construct doesn't provide a way to set the
default value for the particular variable at hand.


Well the API could allow the option to provide a default value if the data doesn't match the input. That's why I used the word "could" because the API for the input filtering hasn't been finalized.

input filtering is not supposed to set defaults. so I would very much recommend not mixing the two.

regards,
Lukas

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



Reply via email to