Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:22408 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 1230 invoked by uid 1010); 14 Mar 2006 14:25:01 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 1214 invoked from network); 14 Mar 2006 14:25:01 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Mar 2006 14:25:01 -0000 X-Host-Fingerprint: 200.252.148.190 unknown Received: from ([200.252.148.190:12252] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 2B/8D-55982-C32D6144 for ; Tue, 14 Mar 2006 09:25:00 -0500 Message-ID: <2B.8D.55982.C32D6144@pb1.pair.com> To: internals@lists.php.net Date: Tue, 14 Mar 2006 11:24:52 -0300 References: <681504473.20060313203035@ionzoft.com> Lines: 24 User-Agent: KNode/0.10.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Posted-By: 200.252.148.190 Subject: Re: New Operator From: cunha17@gmail.com (Cristiano Duarte) Jason Garber wrote: > Hello internals, > > Since nobody could seem to agree on a language construct for > accessing a variable that you don't know exists (ifsetor), > I would like to propose a simpler approach. > > It returns the value of the passed variable, or NULL if the variable > does not exist. > > ifset($some_array['some-key-you-are-not-sure-exists']); IMHO, this wouldn't solve the problem. The problem is that we need default values, not NULL. Sometimes you may want NULL sometimes you may not. > > This E_STRICT ternary pain-in-the-ass expression is constantly at > the top of every PHP script I write: > > $ConfirmCode = (isset($_GET['ConfirmCode']) ? $_GET['ConfirmCode'] : > ''); I agree that this is really a PITA, but until we get an operator for this, we should stuck on the ternary.