Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:86026 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 98442 invoked from network); 29 Apr 2015 16:35:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Apr 2015 16:35:07 -0000 Authentication-Results: pb1.pair.com smtp.mail=ppasindud@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ppasindud@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.223.180 as permitted sender) X-PHP-List-Original-Sender: ppasindud@gmail.com X-Host-Fingerprint: 209.85.223.180 mail-ie0-f180.google.com Received: from [209.85.223.180] ([209.85.223.180:33577] helo=mail-ie0-f180.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D8/D0-26317-93801455 for ; Wed, 29 Apr 2015 12:35:05 -0400 Received: by iecrt8 with SMTP id rt8so46748271iec.0 for ; Wed, 29 Apr 2015 09:35:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=cvFHmeakf8AQdFH607Nui3kiRaXwcY6/PELJVxMQ1gM=; b=EicYnuVdTV2odUZ92s6187tfegU4rcO4hDc1skfD/YN4Sw1hb8edbBLtJUOd/Qnde5 Mp6ES0SfgtZnZtaLEycRD6bAC9+AMLboNVeuc2Fo38OfYH4Ds0HagYxpojxc9YFIZHTe 2fhNcn9EvwEjs0HSGl3/WeWcFsaCxkmbRQHQUNMIGpliDY1RiNYKStBpFFq4zsNrc0Qj HpxVy/U0+NBX5IbMWe2PLDFbO0K07rdjZKecBYZUapWysCAX3bCXdF0fHHeo1TF93CuI VVWBpb0rKlIY3v/szobspVRlW/CvFdoR39nM9XOA3p3vnJfagC0F1LT3Nw52kxNyzHTJ MIjA== MIME-Version: 1.0 X-Received: by 10.50.102.68 with SMTP id fm4mr5369050igb.25.1430324875732; Wed, 29 Apr 2015 09:27:55 -0700 (PDT) Received: by 10.36.3.75 with HTTP; Wed, 29 Apr 2015 09:27:55 -0700 (PDT) In-Reply-To: References: <54E35490.9040709@gmail.com> <5533A275.7050303@gmx.de> <55342724.6020606@gmail.com> <55342C8D.7020509@gmx.de> <55343F3E.3010307@gmail.com> <55350298.1000303@gmx.de> Date: Wed, 29 Apr 2015 21:57:55 +0530 Message-ID: To: Stanislav Malyshev Cc: PHP Internals , Christoph Becker Content-Type: multipart/alternative; boundary=047d7b10c9f921b7ea0514df764d Subject: Re: [PHP-DEV] Re: [RFC] Spaceship operator RFC From: ppasindud@gmail.com (Pasindu De Silva) --047d7b10c9f921b7ea0514df764d Content-Type: text/plain; charset=UTF-8 Found something else today http://3v4l.org/mO48q echo [1, 2, 3] <=> []; // 1 but it gives 3 On Mon, Apr 20, 2015 at 7:29 PM, Pasindu De Silva wrote: > Hi > Found this while trying to do the documentation, Thought the same that it > was a RFC mistake, > therefore didn't put any examples. Will do the necessary documentation if > this is the case. > > +1 > Pasindu > > > On Mon, Apr 20, 2015 at 7:13 PM, Christoph Becker > wrote: > >> Hi! >> >> Stanislav Malyshev wrote: >> >> > Ahh, I see. I think it's the mistake in the RFC. [...] >> >> Then it is probably best to fix the RFC. :) >> >> > I'm not a big fan of throwing too many notices. They are usually not >> > very helpful an din this case it would be not easy to distinguish >> > between intentional and unintentional use. >> >> >> >> > $a > $b being false is an artifact of how ">" works in the engine - $a > >> > $b is essentially ($b < $a). Since in this case both $a > $b and $b > >> > $a, the result of ($b < $a) is false. That's what you get when you >> > compare non-well-ordered things... >> >> I get your point. I suggest to amend the documentation[1] to make it >> clear that comparing non-well-ordered values results in undefined >> behavior (it might be best to treat the return value 1 in this case as >> implementation specific). >> >> [1] >> >> -- >> Christoph M. Becker >> >> -- >> PHP Internals - PHP Runtime Development Mailing List >> To unsubscribe, visit: http://www.php.net/unsub.php >> >> > > > -- > > *Pasindu De Silva**ppasindud@gmail.com * > -- *Pasindu De Silva**ppasindud@gmail.com * --047d7b10c9f921b7ea0514df764d--