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.4.2 - 4.4.9, 5.1.0 - 5.4.27
Parse error: syntax error, unexpected ':' in /in/4vQsS on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected ':' in /in/4vQsS on line 2
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/4vQsS on line 2
Process exited with code 255.