Re: [RFC] Combined Comparison (Spaceship) Operator

From: Date: Fri, 23 Jan 2015 00:48:14 +0000
Subject: Re: [RFC] Combined Comparison (Spaceship) Operator
References: 1 2 3 4 5 6 7  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
On Fri, Jan 23, 2015 at 9:43 AM, Yasuo Ohgaki <[email protected]> wrote:

> Ok. Now I understand. Since we don't/can't define strictly typed
> less/greater than operator,
> it makes sense. It can be handles
>
I always realize silly mistake after I sent mails :(
It can be handled as

>
> if (get_type($a) != get_type($b)) { ... treat it as exception/error etc }
> return $a <=> $b;
>

--
Yasuo Ohgaki
[email protected]


Thread (30 messages)

« previous php.internals (#81009) next »