spaceship Operator Results

With the change of comparison between integers and strings, the spaceship was also impacted. Some spaceship comparisons did change, and are not returning the same results than before.

PHP code

<?php

var_dump( 0 <=> 'foo');
var_dump( 0 <=> '');

?>

Before

int(0)
int(0)

After

int(-1)
int(1)

PHP version change

This behavior changed in 8.0