Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:22412 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 17777 invoked by uid 1010); 14 Mar 2006 15:06:37 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 17762 invoked from network); 14 Mar 2006 15:06:37 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Mar 2006 15:06:37 -0000 X-Host-Fingerprint: 129.41.69.185 smtp.dealnews.com Linux 2.5 (sometimes 2.4) (4) Received: from ([129.41.69.185:44853] helo=smtp.dealnews.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id B6/2F-55982-DFBD6144 for ; Tue, 14 Mar 2006 10:06:37 -0500 Received: (qmail 14801 invoked from network); 14 Mar 2006 10:06:34 -0500 Received: from unknown (HELO ?10.1.2.17?) (10.1.2.17) by 10.1.1.24 with SMTP; 14 Mar 2006 10:06:34 -0500 Message-ID: <4416DBF9.6000006@dealnews.com> Date: Tue, 14 Mar 2006 09:06:33 -0600 User-Agent: Thunderbird 1.5 (X11/20051201) MIME-Version: 1.0 To: Cristiano Duarte CC: internals@lists.php.net References: <681504473.20060313203035@ionzoft.com> <2B.8D.55982.C32D6144@pb1.pair.com> In-Reply-To: <2B.8D.55982.C32D6144@pb1.pair.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: New Operator From: brianm@dealnews.com (Brian Moon) >> $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. Another option is to use settype(); This has two advantages. One, if the variable does not exist, settype creates it with an empty value of the given type. Second, if it does exist, it can semitypecast them for you. settype($_GET['ConfirmCode'], "string"); or $ConfirmCode = $_GET["ConfirmCode"]; settype($ConfirmCode, "string"); Brian Moon dealnews.com