Quantcast
Channel: Serverphorums.com
Viewing all articles
Browse latest Browse all 23908

Re: [PHP-DEV] Re: [RFC] Spaceship operator RFC

$
0
0
Hi Guys
Something changed between alpha 1 and 2.

echo [1, 2, 3] <=> []; // gives the expected result 1 and not 3

http://3v4l.org/5qFS9

Guess the documentation should be changed back.


On Thu, Apr 30, 2015 at 7:29 AM, Christoph Becker <cmbecker69@gmx.de> wrote:

> Stanislav Malyshev wrote:
>
> > 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.
>
> FWIW: the documentation has already been adjusted by Peter (salathe):
>
> https://svn.php.net/viewvc?view=revision&revision=336683
> http://docs.php.net/manual/en/language.operators.comparison.php
>
> --
> Christoph M. Becker
>



--

*Pasindu De Silva**ppasindud@gmail.com <ppasindud@gmail.com>*

Viewing all articles
Browse latest Browse all 23908

Trending Articles