3v4l.org

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