3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php echo "a" <=> "a"; // 0 echo "a" <=> "b"; // -1 echo "b" <=> "a"; // 1 echo "a" <=> "aa"; // -1 echo "zz" <=> "aa"; // 1 echo [] <=> []; // 0 echo [1, 2, 3] <=> [1, 2, 3]; // 0 echo [1, 2, 3] <=> []; // 1 echo [1, 2, 3] <=> [1, 2, 1]; // 1 echo [1, 2, 3] <=> [1, 2, 4]; // -1
Output for 7.0.0 - 7.2.0
0-11-110011-1
Output for 5.3.18 - 5.6.28
Parse error: syntax error, unexpected '>' in /in/Y4isF on line 2
Process exited with code 255.