3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $data = array( '0' => '020', '20.00' => '2050', '50.00' => '50100', // ... ); $price_check = '50.00'; $filter = '0'; // default value foreach ($data as $floor => $value) { if ($floor > $price_check) break; $filter = $value; }
based on 7ECMH
Output for 4.3.0 - 7.1.0