Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:11013 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 7438 invoked by uid 1010); 9 Jul 2004 06:00:10 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 7409 invoked from network); 9 Jul 2004 06:00:09 -0000 Received: from unknown (HELO took.shire) (68.126.141.9) by pb1.pair.com with SMTP; 9 Jul 2004 06:00:09 -0000 Received: (qmail 29356 invoked by uid 1001); 9 Jul 2004 06:11:56 -0000 Date: Fri, 9 Jul 2004 06:11:56 +0000 To: internals@lists.php.net Message-ID: <20040709061156.GU99175@bagend.shire> Mail-Followup-To: internals@lists.php.net References: <5.1.0.14.0.20040708191525.023e7ff0@mail.ionzoft.com> <20040708234919.24862.qmail@pb1.pair.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040708234919.24862.qmail@pb1.pair.com> User-Agent: Mutt/1.4.1i Subject: Re: [PHP-DEV] what happened to that new isset() like language From: curt@php.net (Curt Zirzow) * Thus wrote Marc Richards: > > > Jason Garber wrote: > > > I am interested in the new construct for the exact same reason, E_ALL > development. I am intersted in the ?: operator because it looks alot > simpler, especially if you want to chain them together: > > $user = $_SESSION['user] ?: $_POST['user'] ?: $local_user ?: NULL; At this point, might as well make the Or operator silence E_NOTICE warnings: $user = $_SESSION['user] Or $_POST['user'] Or $local_user Or NULL; at least it would be readable. The biggest problem I have with using ?: is that down the line we might just have something like: $foo = $bar ?%@*&!: $qaz Inventing operators that consist more than one character can lead to trouble. Curt -- First, let me assure you that this is not one of those shady pyramid schemes you've been hearing about. No, sir. Our model is the trapezoid!