Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:26465 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 67203 invoked by uid 1010); 10 Nov 2006 13:26:44 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 67188 invoked from network); 10 Nov 2006 13:26:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Nov 2006 13:26:44 -0000 Authentication-Results: pb1.pair.com smtp.mail=info@adaniels.nl; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=info@adaniels.nl; sender-id=unknown Received-SPF: error (pb1.pair.com: domain adaniels.nl from 82.94.235.198 cause and error) X-PHP-List-Original-Sender: info@adaniels.nl X-Host-Fingerprint: 82.94.235.198 hyak.bean-it.nl Received: from [82.94.235.198] ([82.94.235.198:55347] helo=hyak.bean-it.nl) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F9/24-37447-01E74554 for ; Fri, 10 Nov 2006 08:26:42 -0500 Received: from [127.0.0.1] (bean-it.xs4all.nl [213.84.27.165]) (authenticated bits=0) by hyak.bean-it.nl (8.13.4/8.13.4/Debian-3sarge3) with ESMTP id kAADQQVZ006719 for ; Fri, 10 Nov 2006 14:26:29 +0100 Message-ID: <45547DF7.8080805@adaniels.nl> Date: Fri, 10 Nov 2006 14:26:15 +0100 User-Agent: Thunderbird 1.5.0.8 (Windows/20061025) MIME-Version: 1.0 To: internals@lists.php.net Content-Type: multipart/alternative; boundary="------------080507030201080008020802" X-Virus-Scanned: by amavisd-new X-Spam-Status: No, score=-0.4 required=4.0 tests=BAYES_20,HTML_30_40, HTML_MESSAGE autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on hyak.bean-it.nl Subject: Yet another feature request From: info@adaniels.nl (Arnold Daniels) --------------080507030201080008020802 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi, I see this is the time to do language feature request. So let me add another. I very often use something like: /$a = isset($x['abc']) ? //$x['abc'] : null; /This is to prevent an E_NOTICE from being thrown. This subject is already discussed many times, which led to a suggestion for PHP6 (http://www.php.net/~derick/meeting-notes.html#ifsetor-as-replacement-for-foo-isset-foo-foo-something-else) /$foo = $_GET['foo'] ?: 42;/ This still throws an E_NOTICE when the first parameter is not set. Also $foo will be set to 42 if the input variable is 0. The conclusion is that this feature is useless for the presented situation. I would like something similar to isset: ifsetor($var, [$default = null]); /$a = ifsetor($x['abc']); //$foo = ifsetor($_GET['foo'], 42); / I believe adding this feature will remove the biggest con people have on working with E_NOTICE enabled. I'm sorry if I reopen an already closed subject. Best regards, Arnold --------------080507030201080008020802--