3v4l.org

run code in 300+ PHP versions simultaneously
<?php $nonNewDay = array( array( '2:00 am', '11:00 am' ), array( '2:00 am', '11:00 am' ), array( '2:00 am', '11:00 am' ), array( '2:00 am', '11:00 am' ), array( '2:00 am', '11:00 am' ), // Weekends array( '2:00 am', '1:00 pm' ), array( '2:00 am', '1:00 pm' ), ); $current_date = strtotime(date("g:00 a")); $value = $nonNewDay[date('N')-1]; // for php < 5.1, I think this one will do the work: // $value = $nonNewDay[(date('w') == 0 ? 6 : date('N')-1)]; if ((strtotime($value[0]) <= $current_date) && ($current_date < strtotime($value[1]))) { echo 'Blocked' } ?>

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
5.4.110.0030.04016.49
5.4.100.0030.07316.49
5.4.90.0030.05316.49
5.4.80.0000.05016.36
5.4.70.0030.03716.66
5.4.60.0070.06716.46
5.4.50.0070.04716.38
5.4.40.0100.04316.41
5.4.30.0000.05716.40
5.4.20.0130.06316.39
5.4.10.0030.04316.50
5.4.00.0070.03715.71
5.3.210.0100.03714.51
5.3.200.0100.03714.54
5.3.190.0100.07014.50
5.3.180.0170.06314.36
5.3.170.0070.06014.50
5.3.160.0100.06714.39
5.3.150.0030.04314.52
5.3.140.0000.04014.38
5.3.130.0030.04014.56
5.3.120.0030.03714.48
5.3.110.0130.04014.45
5.3.100.0070.03313.93
5.3.90.0000.05013.95
5.3.80.0030.03713.98
5.3.70.0030.04013.82
5.3.60.0030.07713.97
5.3.50.0100.06713.89
5.3.40.0070.04013.89
5.3.30.0070.03313.85
5.3.20.0030.05313.54
5.3.10.0000.07713.55
5.3.00.0100.07713.61

preferences:
146.64 ms | 1394 KiB | 7 Q