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

2015-07-16 Thread Christoph Becker
Pasindu De Silva wrote: > 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. I suggest to leave the documentation as it is. It is not wrong, the guarantee to

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

2015-07-09 Thread Pasindu De Silva
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 wrote: > Stanislav Malyshev wrote: > > > Yeah compare_funct

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

2015-04-29 Thread Christoph Becker
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.

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

2015-04-29 Thread Stanislav Malyshev
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

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

2015-04-29 Thread Pasindu De Silva
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 d

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

2015-04-20 Thread Pasindu De Silva
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: >