Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:22388 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 56597 invoked by uid 1010); 14 Mar 2006 01:32:42 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 56582 invoked from network); 14 Mar 2006 01:32:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Mar 2006 01:32:42 -0000 X-Host-Fingerprint: 66.216.66.81 mail.ionzoft.com Linux 2.4/2.6 Received: from ([66.216.66.81:41357] helo=mail.ionzoft.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 48/D4-55982-93D16144 for ; Mon, 13 Mar 2006 20:32:42 -0500 Received: from JASONGARBER2 (207-255-4-232-static.aoo.pa.atlanticbb.net [207.255.4.232]) by mail.ionzoft.com (Postfix) with ESMTP id 15E428A4080 for ; Mon, 13 Mar 2006 20:33:46 -0500 (EST) Date: Mon, 13 Mar 2006 20:30:35 -0500 X-Mailer: The Bat! (v3.65.03) Professional Reply-To: Jason Garber Organization: IonZoft, Inc. X-Priority: 3 (Normal) Message-ID: <681504473.20060313203035@ionzoft.com> To: internals@lists.php.net MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: New Operator From: jason@ionzoft.com (Jason Garber) 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']); 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'] : ''); Please? -- Best regards, Jason Garber mailto:jason@ionzoft.com IonZoft, Inc.