3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php for ($i = 10; $i >= 0; --$i){ if ($i == ($i < 1)){ $msg = 'really'; }else if ($i == ($i < 3)) { $msg = 'quite bad'; }else if ($i == ($i < 5)) { $msg = 'pay attention'; }else if ($i == ($i <= 9)){ $msg = 'quite good'; }else if ($i == ($i <= 10)){ $msg = 'congrat'; }else{ $msg = 'Oops'; } echo $i.' '.$msg . "\n"; }
based on 02dlP
Output for 4.3.0 - 7.2.0
10 congrat 9 quite good 8 quite good 7 quite good 6 quite good 5 quite good 4 pay attention 3 pay attention 2 quite bad 1 quite bad 0 Oops