3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function test($a, $b) { var_dump($a === $b); var_dump($a !== $b); var_dump($a < $b); var_dump($a <= $b); var_dump($a == $b); var_dump($a != $b); var_dump($a >= $b); var_dump($a > $b); var_dump($a <=> $b); } class A{}; class C{}; $a = array(0, 1, 2); $b = array(NAN, 1); test($a, $b);
based on tk7Ld
Output for 7.0.0 - 7.2.0
bool(false) bool(true) bool(false) bool(false) bool(false) bool(true) bool(true) bool(true) int(1)
Output for 5.3.17 - 5.6.28
Parse error: syntax error, unexpected '>' in /in/1VLcP on line 12
Process exited with code 255.