3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $day_start="06:00"; $day_end="22:59"; $night_start="23:00"; $night_end="05:59"; $dtarif="30USD"; $ntarif="80USD"; function showtarif($day_start,$day_end,$night_start,$night_end,$dtarif,$ntarif) { $current=date("H:i"); if ($current >=$day_start && $current <=$day_end) { $absulate_tarif=$dtarif; } else if ($current >=$night_start && $current <=$night_end) { $absulate_tarif=$ntarif; } return $absulate_tarif; }
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0