Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:51879 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 67194 invoked from network); 12 Apr 2011 12:21:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Apr 2011 12:21:45 -0000 Authentication-Results: pb1.pair.com header.from=lars.schultz@toolpark.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=lars.schultz@toolpark.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain toolpark.com from 195.49.42.12 cause and error) X-PHP-List-Original-Sender: lars.schultz@toolpark.com X-Host-Fingerprint: 195.49.42.12 mail1.screenlight.ch Received: from [195.49.42.12] ([195.49.42.12:52850] helo=mail1.screenlight.ch) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2A/63-50366-7D344AD4 for ; Tue, 12 Apr 2011 08:21:44 -0400 Received: from [192.168.1.112] ([192.168.1.112]) (authenticated user lars.schultz@toolpark.com) by mail1.screenlight.ch (Kerio Connect 7.0.2 patch 1) (using TLSv1/SSLv3 with cipher AES256-SHA (256 bits)) for internals@lists.php.net; Tue, 12 Apr 2011 14:21:39 +0200 Message-ID: <4DA443D4.5040908@toolpark.com> Date: Tue, 12 Apr 2011 14:21:40 +0200 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.2.9) Gecko/20100915 Lightning/1.0b2 Thunderbird/3.1.4 MIME-Version: 1.0 To: internals@lists.php.net References: <4DA26602.6080303@lorenso.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] proposed access modifier "silent" ... was: Re: [PHP-DEV] Implicit isset/isempty check on short-ternary operator From: lars.schultz@toolpark.com (Lars Schultz) Am 12.04.2011 13:33, schrieb Richard Quadling: > Notice: Undefined variable > Notice: Undefined index To me, these two notices are totally different in severity, but that may be because of how i write my code. I'd like to be able to get rid of the "Undefined index" Notice in a nice, clean, readable way, because that does not bother me (in my style of code). I do wanna be notified if i am using an undefined variable, as that implies something wrong on a more basic level. $x = isset($x)?$x:'default x'; I don't want a construct for this, because I was either lazy or made a mistake when I did not define $x initially. -1 $x = isset($_GET['x'])?$_GET['x']:'default x'; I can see the use for an alternative construct for this though, but it's not really a pressing matter to me. +0.5 But that is just me and my code. Lars