3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $i = 1; $a = $i > 0 ? 1 : 2; echo " a " . $a; if ($i > 0) { $b = 1; } else { $b = 2; } echo " b " . $b;
based on Ut8jS
Output for 4.3.0 - 7.1.0
a 1 b 1