3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $addMode = 'pastdue'; $noticeOrder = array( "initial" => 0, "pastdue" => 1, "final" => 2 ); $noticeType = null; if ($noticeOrder[$addMode] < $noticeOrder[$noticeType]) { print_r("skipped"); } else { $noticeType = $addMode; print_r($noticeType); }
based on untLQ
Output for 5.3.0 - 7.2.0
Notice: Undefined index: in /in/NVFcW on line 13 pastdue
Output for 4.3.0 - 5.2.17
Notice: Undefined index: in /in/NVFcW on line 13 pastdue