运行 ❯
获取您自己的
PHP
服务器
×
更改方向
更改主题、深色/浅色
转到 Spaces
<!DOCTYPE html> <html> <body> <?php $x = 5; $y = 10; echo ($x <=> $y); // returns -1 because $x is less than $y echo "<br>"; $x = 10; $y = 10; echo ($x <=> $y); // returns 0 because values are equal echo "<br>"; $x = 15; $y = 10; echo ($x <=> $y); // returns +1 because $x is greater than $y ?> </body> </html>
-1
0
1