3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $levels = array(0, 24999, 49999, 74999, 99999, 124999); $myallcreadits = 60000; foreach($levels as $index => $level) { if ($myallcreadits > $level) $current_level = $index; } echo $current_level;
Output for 4.3.0 - 7.1.0
2