3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php compare($x, $y); print_r($x, true); print_r($y, true); echo "\nAFTER\n"; compare($x, $y); function compare($x, $y) { echo 'x > y: '; var_dump($x > $y); echo 'x < y: '; var_dump($x < $y); echo 'x == y: '; var_dump($x == $y); echo 'x != y: '; var_dump($x != $y); }
Output for 5.0.4 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
Notice: Undefined variable: x in /in/dVI6O on line 2 Notice: Undefined variable: y in /in/dVI6O on line 2 x > y: bool(false) x < y: bool(false) x == y: bool(true) x != y: bool(false) Notice: Undefined variable: x in /in/dVI6O on line 3 Notice: Undefined variable: y in /in/dVI6O on line 4 AFTER Notice: Undefined variable: x in /in/dVI6O on line 6 Notice: Undefined variable: y in /in/dVI6O on line 6 x > y: bool(false) x < y: bool(false) x == y: bool(true) x != y: bool(false)
Output for hhvm-3.10.0

Process exited with code 153.
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: x in /in/dVI6O on line 2 Notice: Undefined variable: y in /in/dVI6O on line 2 x > y: bool(false) x < y: bool(false) x == y: bool(true) x != y: bool(false) Notice: Undefined variable: x in /in/dVI6O on line 3 Notice: Undefined variable: y in /in/dVI6O on line 4 AFTER Notice: Undefined variable: x in /in/dVI6O on line 6 Notice: Undefined variable: y in /in/dVI6O on line 6 x > y: bool(false) x < y: bool(false) x == y: bool(true) x != y: bool(false)