Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:19820 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 35692 invoked by uid 1010); 29 Oct 2005 20:27:38 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 35677 invoked from network); 29 Oct 2005 20:27:38 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Oct 2005 20:27:38 -0000 X-Host-Fingerprint: 209.151.236.4 namshub.die.net Linux 2.4/2.6 Received: from ([209.151.236.4:59112] helo=mx1.die.net) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 85/79-02082-93BD3634 for ; Sat, 29 Oct 2005 16:27:37 -0400 Received: (qmail 23029 invoked from network); 29 Oct 2005 20:27:34 -0000 Received: from unknown (HELO ?66.180.199.106?) (mrc@66.180.199.106) by mx1.die.net with SMTP; 29 Oct 2005 20:27:33 -0000 Message-ID: <4363DB35.7080808@safesearching.com> Date: Sat, 29 Oct 2005 13:27:33 -0700 User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Greg Beaver CC: internals@lists.php.net References: <4362C5F4.8090004@safesearching.com> <4e36d31d0510281847m3f54c70dy8b2a0679fa3c6cec@mail.gmail.com> <4362DFAB.1090701@safesearching.com> <43630958.4060406@php.net> In-Reply-To: <43630958.4060406@php.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] what happened to that new isset() like language From: james@safesearching.com (James Crumpton) A good point certainly... I suppose it could continue to follow the current form, evaluating $c as false and return int(1) instead of bool(true). Though that would probably diminish it's utility for 'if set or'. And there would be a BC break for those doing: $a = $b || $c; if ($a === true) { } But anyone doing that should probably have their head examined. Anyway... Regardless of what can be said about changing the behavior of '||', the same isn't true for '||=', as it has no precedence in PHP. -james Greg Beaver wrote: >James Crumpton wrote: > > >>Evaluating an idea based on it's syntactic similarities to other >>languages is complete and utter nonsense. It has nothing to with being >>like language Xyz. It has to do with familiarity to language constructs. >>One already understands the idea of 'this || that'. It's certainly >> >> > >I'll throw the water on this one: > >$c = 0; >$a = 1; >var_dump($c || $a); >?> > >With the existing PHP, this script results in: > >bool(true) > >With your proposed change because it would return the first non-null set >variable, it will instead output: > >int(0) > >Changing true into false consitutes a rather severe BC break :). > >Greg > > >