Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:11002 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 12374 invoked by uid 1010); 8 Jul 2004 23:15:40 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 12348 invoked from network); 8 Jul 2004 23:15:40 -0000 Received: from unknown (HELO theta.altoona-pa.com) (209.161.72.28) by pb1.pair.com with SMTP; 8 Jul 2004 23:15:40 -0000 Received: from ionzoft-jeg.ionzoft.com (dpvc-207-68-114-163.alt.east.verizon.net [207.68.114.163]) by theta.altoona-pa.com (Postfix) with ESMTP id 7C6421591E for ; Thu, 8 Jul 2004 19:15:39 -0400 (EDT) Message-ID: <5.1.0.14.0.20040708191525.023e7ff0@mail.ionzoft.com> X-Sender: izftjason@mail.ionzoft.com X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Thu, 08 Jul 2004 19:15:43 -0400 To: internals@lists.php.net Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: Re: [PHP-DEV] what happened to that new isset() like language From: jason@ionzoft.com (Jason Garber) The original reason that I asked for this functionality was to make it significantly easier to work with E_ALL error reporting. When I say easier, I mean by reducing duplicate code. //This $foo = (integer) ifsetor($_POST['foo'], 0); //Instead of $foo = (integer) (isset($_POST['foo']) ? $_POST['foo'] : 0); It was also to be useful for accessing array elements that may or may not be there. I strongly agree with Ramsus that ?: is far to close to the ternary operator and would prove to be *highly* confusing to beginners. Marcus made an excellent point about the 2 versions of the function: 1) $a = ifsetor($b) 2) $a = ifsetor($b, NULL) By the way, I'm not stuck on ifsetor() as a name, but a) the name should be short and clear b) the construct must be called with function like syntax Marc, I must ask, why are you so opposed to the function() syntax? There has been quite a few reasons stated against the operator syntax, but I haven't heard any reason why we should not go with the function() syntax? Sincerely, Jason Garber