Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:43910 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 69296 invoked from network); 12 May 2009 17:38:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 May 2009 17:38:40 -0000 Authentication-Results: pb1.pair.com header.from=robert@interjinn.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=robert@interjinn.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain interjinn.com from 66.11.173.122 cause and error) X-PHP-List-Original-Sender: robert@interjinn.com X-Host-Fingerprint: 66.11.173.122 unknown Received: from [66.11.173.122] ([66.11.173.122:44440] helo=interjinn.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3A/26-64369-E14B90A4 for ; Tue, 12 May 2009 13:38:38 -0400 Received: from [192.168.1.3] (blobbie [192.168.1.3]) by interjinn.com (Postfix) with ESMTP id 8717238C466; Tue, 12 May 2009 13:38:16 -0400 (EDT) To: Lewis Wright Cc: =?ISO-8859-1?Q?=D3lafur?= Waage , internals@lists.php.net In-Reply-To: References: <8c35d7690905120935t18722295i69217245c9296a6d@mail.gmail.com> Content-Type: text/plain Organization: InterJinn Date: Tue, 12 May 2009 13:39:41 -0400 Message-ID: <1242149981.10178.25.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] The constant use of isset() From: robert@interjinn.com (Robert Cummings) On Tue, 2009-05-12 at 18:23 +0100, Lewis Wright wrote: > Regarding ifsetor, what's wrong with just using this: > > isset($myvar) OR $myvar = 'i am set'; > > It works in just the same way and has no problems. I agree it would be > great though if there could be a function to retrieve a variable's > value if it exists, without throwing an error if it doesn't exist. I'm > not sure if isset would be appropriate though. > > Lewis. mixed value_of( $variable [, $defaultValue=null] ); Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP