Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80811 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 55775 invoked from network); 19 Jan 2015 12:53:20 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Jan 2015 12:53:20 -0000 Authentication-Results: pb1.pair.com header.from=addw@phcomp.co.uk; sender-id=permerror Authentication-Results: pb1.pair.com smtp.mail=addw@phcomp.co.uk; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain phcomp.co.uk designates 78.32.209.33 as permitted sender) X-PHP-List-Original-Sender: addw@phcomp.co.uk X-Host-Fingerprint: 78.32.209.33 freshmint.phcomp.co.uk Received: from [78.32.209.33] ([78.32.209.33:42749] helo=mint.phcomp.co.uk) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 40/E1-64889-F3EFCB45 for ; Mon, 19 Jan 2015 07:53:19 -0500 Received: from addw by mint.phcomp.co.uk with local (Exim 4.72) (envelope-from ) id 1YDBpU-0006y9-07 for internals@lists.php.net; Mon, 19 Jan 2015 12:53:16 +0000 Date: Mon, 19 Jan 2015 12:53:15 +0000 To: internals@lists.php.net Message-ID: <20150119125315.GT7486@phcomp.co.uk> Mail-Followup-To: internals@lists.php.net References: <53F8A1FF-C809-4DDF-9C6F-6916C3E4F044@ajf.me> <20150119110639.GO7486@phcomp.co.uk> <8A3DA508-E6A3-486C-8A84-839AEC78D0FF@ajf.me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <8A3DA508-E6A3-486C-8A84-839AEC78D0FF@ajf.me> Organization: Parliament Hill Computers Ltd User-Agent: Mutt/1.5.20 (2009-12-10) Subject: Re: [PHP-DEV] [RFC] Combined Comparison (Spaceship) Operator From: addw@phcomp.co.uk (Alain Williams) On Mon, Jan 19, 2015 at 12:30:14PM +0000, Andrea Faulds wrote: > Hi Alain, > > > On 19 Jan 2015, at 11:06, Alain Williams wrote: > > > > On Mon, Jan 19, 2015 at 08:28:17AM +0000, Andrea Faulds wrote: > > > >> The RFC is here: https://wiki.php.net/rfc/combined-comparison-operator > > > > I like it. > > > > The RFC does not say what the precedence is to be. Could I suggest that it be > > the same as ''== != === !== <>'' - which keeps it consistent with Perl. > > It has the same precedence as the other comparison operators, it’s non-associative. Sorry to be a persistent pain, but PHP has 2 sets of comparison operators with different precedence: ''< <= > >='' ''== != === !== <>'' I think that the RFC should clearly state that spaceship joins the 2nd set of operators in the precedence table. The introduction kind of hints that it would join the first lot -- but that would be inconsistent with Perl. http://uk1.php.net/manual/en/language.operators.precedence.php -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk/contact.php #include