Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:15077 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 13837 invoked by uid 1010); 17 Feb 2005 22:37:18 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 13822 invoked by uid 1007); 17 Feb 2005 22:37:18 -0000 To: internals@lists.php.net, Andi Gutmans Message-ID: <42151C9C.4060502@php.net> Date: Thu, 17 Feb 2005 23:37:16 +0100 User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 CC: Daniel Convissor References: <5.1.0.14.2.20050217122003.01f59748@localhost> <5.1.0.14.2.20050217114315.02076c60@localhost> <59089102.20050217201853@marcus-boerger.de> <5.1.0.14.2.20050217114315.02076c60@localhost> <5.1.0.14.2.20050217122003.01f59748@localhost> <5.1.0.14.2.20050217124349.01eb0fc0@localhost> In-Reply-To: <5.1.0.14.2.20050217124349.01eb0fc0@localhost> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 82.140.22.219 Subject: Re: [PHP-DEV] Before March 1st aka PHP 5.1 beta From: lsmith@php.net (Lukas Smith) 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