Re: Re: [RFC] Spaceship operator RFC
| From: | Stanislav Malyshev | Date: | Wed, 29 Apr 2015 23:19:24 +0000 |
| Subject: | Re: Re: [RFC] Spaceship operator RFC | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-86040@lists.php.net to get a copy of this message | ||
Hi!
> Found something else today
>
> http://3v4l.org/mO48q
>
> echo [1, 2, 3] <=> []; // 1 but it gives 3
Yeah compare_function can actually return more than 1, 0 and -1, esp.
for arrays but maybe . I'm not sure if we should change this or not. It
should be pretty easy to fix, just not sure why it's this way now - see
zend_compare_arrays and down to zend_hash_compare.
--
Stas Malyshev
smalyshev@gmail.com