3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function isOdd($var) { return($var & 1); } for($i = 0; $i < 10; $i++) { echo $i . ': '; echo isOdd($i) == 1 ? 'odd' : 'even'; echo "\r\n"; }
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
0: even 1: odd 2: even 3: odd 4: even 5: odd 6: even 7: odd 8: even 9: odd