Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:14518 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 64498 invoked by uid 1010); 2 Feb 2005 07:26:16 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 64465 invoked from network); 2 Feb 2005 07:26:16 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Feb 2005 07:26:16 -0000 X-Host-Fingerprint: 66.198.51.121 lerdorf.com Linux 2.4/2.6 Received: from ([66.198.51.121:35689] helo=colo.lerdorf.com) by pb1.pair.com (ecelerity HEAD (r4105:4106)) with SMTP id 54/40-11295-79080024 for ; Wed, 02 Feb 2005 02:26:16 -0500 Received: from [192.168.2.106] (c-24-6-1-160.client.comcast.net [24.6.1.160]) (authenticated bits=0) by colo.lerdorf.com (8.13.3/8.13.3/Debian-4) with ESMTP id j127Q5WU001243 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 1 Feb 2005 23:26:06 -0800 Message-ID: <4200808D.6020500@lerdorf.com> Date: Tue, 01 Feb 2005 23:26:05 -0800 User-Agent: Mozilla Thunderbird 1.0 (Macintosh/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Xuefer Tinys CC: Ryan King , Sean Coates , internals@lists.php.net References: <5.1.0.14.2.20050201111730.0299da70@localhost> <5.1.0.14.2.20050201142816.026d21c0@localhost> <5.1.0.14.2.20050201151955.02730ec0@localhost> <4200169A.6050905@lerdorf.com> <420052A4.2040100@caedmon.net> <562E08AE-74DA-11D9-9619-000D9331A4BC@mac.com> <28139bc05020121503ff25b95@mail.gmail.com> In-Reply-To: <28139bc05020121503ff25b95@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] PHP 5.1 From: rasmus@lerdorf.com (Rasmus Lerdorf) Xuefer Tinys wrote: > more choices: > foo_bar(string $key or array $keys, int or string $how) > bar can be one of get,post,request,env,server > foo may be filter? ifilter? (i for input) > > may foo be empty? _get _post etc.. > $how is default to FILTER_RAW so we have _get("abc") and _GET("abc") > for raw data same as $_GET['abc'] before. it's just simple > and it would make user easy to migrate their thinking, not just the script > we had made too much changes: $abc -> $HTTP_GET_VARS['abc'] -> > $_GET['abc'] -> _GET('abc') or filter_xxx(GET...) I don't think you understand. The idea here is not to change anything. Changing to _GET('abc') with a default raw filter would be completely pointless. People would still be using $_GET['abc'] just like before. If, and only if a default filter is in place in the ini file, then this value is filtered. Depending on the filter this just means that the app will run exactly like before, except tags would be stripped, for example. If no default filter is in place, which would be the most common case as it wouldn't be turned on by default, then this extension in no way affects existing code. In this case all it provides are a set of easy to use data filtering functions that an application can make use of instead of trying to dream up regular expressions to handle all the various cases. I think we have seen over the past couple of years that this is a very hard problem for developers to tackle in each and every PHP application and the whole point of PHP is to tackle these hard problems and provide an easy solution. Anyway, I'll try to get some code into CVS this weekend and you guys can have a look. -Rasmus