Hi,

I found a problem with spaceship operator.
It doesn't define result for comparison with NaN.

$ sapi/cli/php -r 'var_dump(sqrt(-1) <=> 0);'
int(-1)
$ sapi/cli/php -r 'var_dump(0 <=> sqrt(-1));'
int(-1)

$ sapi/cli/php -r 'var_dump(0 < sqrt(-1));'
bool(false)

all other comparison operators return "false" as well.

Thanks. Dmitry.

Reply via email to