Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:16655 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 2588 invoked by uid 1010); 14 Jun 2005 09:28:36 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 2573 invoked from network); 14 Jun 2005 09:28:36 -0000 Received: from unknown (HELO pb1.pair.com) (127.0.0.1) by localhost with SMTP; 14 Jun 2005 09:28:36 -0000 X-Host-Fingerprint: 62.131.2.67 ip3e830243.speed.planet.nl Received: from ([62.131.2.67:12528] helo=localhost.localdomain) by pb1.pair.com (ecelerity 1.2 r(5656M)) with SMTP id D1/54-20931-343AEA24 for ; Tue, 14 Jun 2005 05:28:35 -0400 Message-ID: To: internals@lists.php.net Date: Tue, 14 Jun 2005 11:28:49 +0200 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050319 X-Accept-Language: en-us, en MIME-Version: 1.0 References: <5.1.0.14.2.20050603203711.028e9140@localhost> <200506051859.53976.magnus@php.net> <6E.27.21296.C90E7A24@pb1.pair.com> <38.CE.21296.BFD78A24@pb1.pair.com> <43.34.20931.17BEDA24@pb1.pair.com> <1118701987.27553.6.camel@blobule.suds> <53F92510-14F5-4E4E-939F-8FC382A7B925@botimer.net> <87728790.20050613214458@ionzoft.com> <52.4A.20931.FBB6EA24@pb1.pair.com> <1118730688.27553.19.camel@blobule.suds> In-Reply-To: <1118730688.27553.19.camel@blobule.suds> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 62.131.2.67 Subject: Re: [PHP-DEV] PHP 5.1 From: tularis@php.net ("M. Sokolewicz") Robert Cummings wrote: > On Tue, 2005-06-14 at 01:31, Ron Korving wrote: > >>Jason, you are absolutely right.. this is not about input filtering at all. >>It's about replacing: >> >>$x = (isset($ANY_var) ? $ANY_var : 'Default Value'); >>by >>$x = ifsetor($ANY_var, 'Default Value'); >> >>So, Robert's solution is no real solution if you ask me. But again, it would >>be best, if there was no ifsetor() at all, I must say I fully agree; I don't see any use in putting extra functions in the PHP namespace just because people don't want to type a couple of extra characters. but that users would have the >>power to create such a function themselves in the php code space. I have no >>clue how though... > > > Well my code has nothing to do with filtering. It's all about retrieving > a default value if one is not set in response to the poster to which I > replied. But yes, I was hasty with it in my eternal lack of wisdom, and > of course forgot about scalars. For the record, I am indeed in favour of > something that allows the choice of a value from a series of values for > which some may not be set-- without the generation of not set warnings > :) > > On that note, how comes there's a $GLOBAL array and not a $LOCAL array > for vars declared in the immediate scope :) because, by definition, $LOCAL would at all times be a part of $GLOBAL. And besides, why would you ever want $LOCAL? $GLOBAL is a way to reach the global scope from the local scope. When being in global scope, you never *have* a local scope, and the other way around, when being in local scope, you can reach all variables directly anyway, so there's no use for $LOCAL. Then, expecting the response "why is there a $GLOBAL array in global scope?" you might want to say that $GLOBAL is a superglobal just because the "global" scope can be seen as a "local" scope in a broader perspective. Well... that's my view on it anyway... > > Cheers, > Rob.