Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:11031 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 36508 invoked by uid 1010); 9 Jul 2004 16:42:12 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 36464 invoked by uid 1007); 9 Jul 2004 16:42:12 -0000 Message-ID: <20040709164211.36463.qmail@pb1.pair.com> To: internals@lists.php.net References: <5.1.0.14.0.20040707203931.02fa6200@mail.ionzoft.com> <40ED64A0.7050305@cschneid.com> <20040708151952.92187.qmail@pb1.pair.com> <20040708215205.23281.qmail@pb1.pair.com> <20040708222005.4329.qmail@pb1.pair.com> <20040708233326.73283.qmail@pb1.pair.com> <20040708235341.42767.qmail@pb1.pair.com> <007201c4655d$283125d0$6601a8c0@calhoun> Date: Sat, 10 Jul 2004 00:42:10 +0800 Lines: 35 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 X-Posted-By: 61.6.174.180 Subject: Re: [PHP-DEV] what happened to that new isset() like language From: jlim@natsoft.com.my ("John Lim") Hi, I would suggest another name for ifsetor. In relational databases, there is a similar function, called NVL in oracle, and IFNULL in MySQL and coalesce in postgresql for testing for null, and returning a default value if the variable is null. I think ifsetor sounds a big ugly. I would suggest ifset($var, $defaultvalue), as there are historical analogies with mysql's IFNULL function, and i think ifset looks different enough from isset, thanks to the tall 'F'. $var = isset($aval) ? $aval : 0; $var = ifset($aval, 0); Thanks, John "Daniel Crookston" wrote in message news:007201c4655d$283125d0$6601a8c0@calhoun... > Why not just call it the issetor, or the setor operator? Also, why does > www.php.net/ternary not link to what one would assume it might link to? We > could do the same with www.php.net/setor. > > Dan > > > But the fact still remains that if we did go with > > this syntax, we could and probably should find a name for it.