Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:81010 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 96373 invoked from network); 23 Jan 2015 00:51:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Jan 2015 00:51:44 -0000 Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.49 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.216.49 mail-qa0-f49.google.com Received: from [209.85.216.49] ([209.85.216.49:61661] helo=mail-qa0-f49.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F1/17-61273-F1B91C45 for ; Thu, 22 Jan 2015 19:51:44 -0500 Received: by mail-qa0-f49.google.com with SMTP id v8so3810803qal.8 for ; Thu, 22 Jan 2015 16:51:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=juj5ViN5lqE7ssvt5QLv5reeh2DpRf2JUFK7MB1wtAQ=; b=FIdHZOfrND0PwwZypQo5CV+MFHogBZB75Aod+XpS7Qv/u4RM3hgNXICafs3Z9caA+E 9TGdBGo1tA+zbVS9x2JPihSHvMht+ldZELCPCMfTr+zhHPbRm5NRUHjdUQMbh+mtvZZ0 zqHgW0t7zntjq2qRDw9Y/BroR/i1BQewUM18WPr1qLDQt2e+94hAneLwEajByMArZf1X nKqYDqi/fEld6PdQ8Z8nQ5LWGVQhXaItVUej8nwrdiCjOwVQqGqP7btQbQMv4iIadSCZ IIAd2wZsMjAtnR7QuVPJjLkPdkbe0Yt6ey+ADdkRQQBkJepM2yfO/IRKtOGivQbJl0Zt TTAw== X-Received: by 10.224.121.79 with SMTP id g15mr8859784qar.68.1421973849888; Thu, 22 Jan 2015 16:44:09 -0800 (PST) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.229.93.70 with HTTP; Thu, 22 Jan 2015 16:43:29 -0800 (PST) In-Reply-To: <8858EE5D-7472-41F7-9C38-091043100ABF@ajf.me> References: <53F8A1FF-C809-4DDF-9C6F-6916C3E4F044@ajf.me> <3251D635-D97C-4738-B537-935A6CC21E19@ajf.me> <54C17E2B.80708@garfieldtech.com> <8858EE5D-7472-41F7-9C38-091043100ABF@ajf.me> Date: Fri, 23 Jan 2015 09:43:29 +0900 X-Google-Sender-Auth: RWldIl_clCfJbaygXI3tAF6fMqQ Message-ID: To: Andrea Faulds Cc: Larry Garfield , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=089e015371d033e01e050d471621 Subject: Re: [PHP-DEV] [RFC] Combined Comparison (Spaceship) Operator From: yohgaki@ohgaki.net (Yasuo Ohgaki) --089e015371d033e01e050d471621 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Andrea, On Fri, Jan 23, 2015 at 9:24 AM, Andrea Faulds wrote: > Having it be the same as =3D=3D=3D would be inconsistent with our existin= g > sorting and comparison behaviour, so I don=E2=80=99t think it should be c= hanged. If > we made it strict like that, we=E2=80=99d also have to define a strict < = and > as > well, otherwise we have a problem, because in some cases ($x !=3D=3D $y &= & !($x > < $y) && !($x > $y)) is TRUE. Ok. Now I understand. Since we don't/can't define strictly typed less/greater than operator, it makes sense. It can be handles if (get_type($a) !=3D get_type($b)) { ... treat it as exception/error etc } return $a <=3D> $b; Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --089e015371d033e01e050d471621--