Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:34939 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 68847 invoked by uid 1010); 26 Jan 2008 17:00:55 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 68831 invoked from network); 26 Jan 2008 17:00:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Jan 2008 17:00:54 -0000 Received: from [127.0.0.1] ([127.0.0.1:17216]) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ECSTREAM id CE/7E-08850-6476B974 for ; Sat, 26 Jan 2008 12:00:54 -0500 X-Host-Fingerprint: 84.166.32.72 p54A62048.dip0.t-ipconnect.de Received: from [84.166.32.72] ([84.166.32.72:10977] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C9/ED-08850-17F5B974 for ; Sat, 26 Jan 2008 11:27:32 -0500 Message-ID: To: internals@lists.php.net Reply-To: "Sebastian" Date: Sat, 26 Jan 2008 17:30:32 +0100 Lines: 31 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3138 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-Posted-By: 84.166.32.72 Subject: ifsetor like expression in php6 From: admin@ifyouwantblood.de ("Sebastian") hi, i just found the new ifsetor like construction in php6. It left me the question why php has to throw an E_NOTICE when the variable is not set. This is basicly because that actually is the meaning of this construction, checking if the variable is set and if it isnt give back a standard value. Of course i know this construction can be (mis)used with an Boolean check ($var===$var2), but this does not make much sence either because TRUE will then be assigned to the new variable if the expression evaluates to TRUE (but please correct me if theres a real use for this). So in any case it would be better to remove the Boolean check feature and make it a simple ifsetor() without the E_NOTICE again. For those of you who have not heard of it heres an example: Greetings Sebastian