3v4l.org

run code in 300+ PHP versions simultaneously
<?php $formattedTime = intval(date("Hi", 1429243145)); $curfew = intval(date("Hi", strtotime('20:00'))); //'H' will get the hour of the time from 0-23, intval will convert that to an integer if($formattedTime > $curfew) { echo "You are past the curfew time"; } else { echo "Success"; } echo "\n$formattedTime:$curfew";
Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.38, 7.0.0 - 7.0.33, 7.1.0 - 7.1.25, 7.2.0 - 7.2.33, 7.3.0 - 7.3.31, 7.4.0 - 7.4.33, 8.0.0 - 8.0.12, 8.0.14 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
Success 559:2000
Output for 7.3.32 - 7.3.33, 8.0.13
Success 359:2000

preferences:
290.63 ms | 405 KiB | 424 Q