3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getHolidays($year = null) { if ($year === null) { $year = intval(date('Y')); } $easterDate = easter_date($year); $easterDay = date('j', $easterDate); $easterMonth = date('n', $easterDate); $easterYear = date('Y', $easterDate); $holidays = array( // Dates fixes mktime(0, 0, 0, 1, 1, $year), // 1er janvier mktime(0, 0, 0, 5, 1, $year), // Fête du travail mktime(0, 0, 0, 5, 8, $year), // Victoire des alliés mktime(0, 0, 0, 7, 14, $year), // Fête nationale mktime(0, 0, 0, 8, 15, $year), // Assomption mktime(0, 0, 0, 11, 1, $year), // Toussaint mktime(0, 0, 0, 11, 11, $year), // Armistice mktime(0, 0, 0, 12, 25, $year), // Noel // Dates variables mktime(0, 0, 0, $easterMonth, $easterDay + 2, $easterYear), mktime(0, 0, 0, $easterMonth, $easterDay + 40, $easterYear), mktime(0, 0, 0, $easterMonth, $easterDay + 50, $easterYear), ); sort($holidays); return $holidays; } $a = getHolidays(); $date = '08/05/2014'; $dlc = explode("/",$date); $dlc = strtotime($dlc[1]."/".$dlc[0]."/".$dlc[2]); if(in_array($dlc,$a))echo 'OK';

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)
8.3.60.0140.00016.75
8.3.50.0070.01421.99
8.3.40.0110.00418.71
8.3.30.0070.00719.09
8.3.20.0050.00320.39
8.3.10.0070.00021.78
8.3.00.0080.00018.04
8.2.180.0030.01716.63
8.2.170.0100.00722.96
8.2.160.0070.00720.30
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0140.00326.16
8.2.120.0090.00020.73
8.2.110.0060.00320.38
8.2.100.0090.00317.61
8.2.90.0040.00419.08
8.2.80.0030.00517.97
8.2.70.0030.00617.61
8.2.60.0000.00817.80
8.2.50.0060.00318.07
8.2.40.0040.00418.34
8.2.30.0040.00418.13
8.2.20.0040.00417.68
8.2.10.0050.00218.00
8.2.00.0050.00317.79
8.1.280.0110.01125.92
8.1.270.0040.00423.72
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0030.00723.78
8.1.230.0070.00423.89
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0040.00417.35
8.1.190.0000.00817.22
8.1.180.0040.00418.10
8.1.170.0060.00318.63
8.1.160.0000.00721.98
8.1.150.0040.00418.78
8.1.140.0030.00617.59
8.1.130.0000.00717.92
8.1.120.0040.00417.59
8.1.110.0050.00317.52
8.1.100.0050.00317.62
8.1.90.0030.00317.61
8.1.80.0020.00517.67
8.1.70.0050.00217.58
8.1.60.0040.00417.67
8.1.50.0000.00817.52
8.1.40.0000.00817.55
8.1.30.0050.00317.71
8.1.20.0000.00817.80
8.1.10.0070.00017.64
8.1.00.0050.00217.51
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0030.00318.52
8.0.270.0070.00017.29
8.0.260.0030.00317.34
8.0.250.0030.00317.11
8.0.240.0030.00617.13
8.0.230.0030.00317.02
8.0.220.0000.00717.05
8.0.210.0040.00417.07
8.0.200.0030.00317.05
8.0.190.0070.00016.98
8.0.180.0040.00416.94
8.0.170.0000.00816.98
8.0.160.0060.00317.04
8.0.150.0040.00417.01
8.0.140.0040.00416.99
8.0.130.0050.00013.29
8.0.120.0000.00716.86
8.0.110.0050.00317.01
8.0.100.0070.00016.87
8.0.90.0040.00417.01
8.0.80.0030.01216.94
8.0.70.0070.00016.86
8.0.60.0030.00616.99
8.0.50.0050.00316.88
8.0.30.0090.01117.11
8.0.20.0100.01017.40
8.0.10.0020.00517.12
8.0.00.0110.00816.75
7.4.330.0050.00015.03
7.4.320.0000.00716.65
7.4.300.0060.00016.63
7.4.290.0000.00716.69
7.4.280.0040.00416.54
7.4.270.0030.00316.62
7.4.260.0050.00216.69
7.4.250.0040.00416.67
7.4.240.0000.00716.71
7.4.230.0040.00416.49
7.4.220.0130.00616.65
7.4.210.0060.00916.70
7.4.200.0050.00316.72
7.4.160.0120.00416.64
7.4.150.0140.00417.40
7.4.140.0110.00617.86
7.4.130.0100.00916.76
7.4.120.0090.01216.60
7.4.110.0100.00716.64
7.4.100.0090.00916.67
7.4.90.0110.00616.80
7.4.80.0040.01719.39
7.4.70.0120.00316.79
7.4.60.0040.01316.77
7.4.50.0000.00716.80
7.4.40.0100.00716.64
7.4.30.0070.01416.89
7.4.00.0070.00815.06
7.3.330.0030.00313.32
7.3.320.0060.00013.21
7.3.310.0030.00316.31
7.3.300.0040.00416.33
7.3.290.0030.01016.51
7.3.280.0080.01216.46
7.3.270.0090.00917.40
7.3.260.0130.00516.66
7.3.250.0130.00716.61
7.3.240.0040.01216.71
7.3.230.0100.00716.77
7.3.210.0090.00916.66
7.3.200.0070.01419.39
7.3.190.0140.00316.70
7.3.180.0000.01616.72
7.3.170.0070.01016.54
7.3.160.0060.01216.55
7.3.120.0060.00915.08
7.3.110.0080.00814.96
7.3.100.0070.01014.74
7.3.90.0030.01415.07
7.3.80.0090.00614.85
7.3.70.0070.00715.02
7.3.60.0080.00414.79
7.3.50.0060.00614.90
7.3.40.0090.00614.77
7.3.30.0030.01414.74
7.3.20.0070.00716.71
7.3.10.0040.00816.63
7.3.00.0000.01316.52
7.2.330.0140.01016.75
7.2.320.0140.01016.56
7.2.310.0100.01316.66
7.2.300.0120.00616.86
7.2.290.0060.00916.62
7.2.250.0180.00014.81
7.2.240.0130.00715.27
7.2.230.0090.00615.41
7.2.220.0090.00915.14
7.2.210.0130.00314.97
7.2.200.0000.01315.14
7.2.190.0040.01115.03
7.2.180.0080.00814.98
7.2.170.0000.01315.09
7.1.330.0100.00315.78
7.1.320.0080.00615.71
7.1.310.0030.01316.10
7.1.300.0030.01315.77
7.1.290.0040.01115.87
7.1.280.0060.00615.66
7.1.270.0000.01115.89
7.1.260.0030.00916.04
7.1.100.0310.00617.63
7.1.70.0030.01217.04
7.1.60.0100.01019.25
7.1.50.0100.01317.13
7.1.00.0100.06722.30
7.0.200.0000.00816.70
7.0.140.0070.07322.09
7.0.90.0030.08721.94
7.0.80.0030.05321.67
7.0.70.0030.05721.74
7.0.60.0100.06021.79
7.0.50.0100.07722.11
7.0.40.0070.08020.04
7.0.30.0100.07720.03
7.0.20.0070.08720.04
7.0.10.0070.08020.13
7.0.00.0100.06320.12
5.6.280.0000.07721.03
5.6.240.0070.05320.62
5.6.230.0070.05020.52
5.6.220.0030.05720.51
5.6.210.0030.05320.48
5.6.200.0070.07720.96
5.6.190.0170.07021.02
5.6.180.0000.06321.09
5.6.170.0130.08021.00
5.6.160.0000.07021.02
5.6.150.0000.07020.97
5.6.140.0100.07321.15
5.6.130.0030.05021.09
5.6.120.0070.08021.13
5.6.110.0030.08721.12
5.6.100.0030.04721.02
5.6.90.0070.08321.13
5.6.80.0100.07020.46
5.6.70.0070.07320.57
5.6.60.0000.08020.50
5.6.50.0070.08020.44
5.6.40.0030.08320.38
5.6.30.0070.03720.41
5.6.20.0100.07720.45
5.6.10.0070.04020.31
5.6.00.0000.08020.34
5.5.380.0070.06020.39
5.5.370.0000.04320.45
5.5.360.0030.08020.42
5.5.350.0030.08320.36
5.5.340.0070.04320.89
5.5.330.0100.04020.66
5.5.320.0170.07020.96
5.5.310.0000.08720.89
5.5.300.0100.04020.66
5.5.290.0030.07720.90
5.5.280.0000.09020.80
5.5.270.0000.09020.93
5.5.260.0100.08020.66
5.5.250.0000.07720.65
5.5.240.0070.06020.32
5.5.230.0030.06020.26
5.5.220.0030.07720.01
5.5.210.0030.08020.26
5.5.200.0100.05020.14
5.5.190.0070.05320.13
5.5.180.0030.06020.04
5.5.160.0030.07320.09
5.5.150.0070.05720.25
5.5.140.0030.07020.11
5.5.130.0030.07720.24
5.5.120.0130.07320.23
5.5.110.0030.07720.20
5.5.100.0100.07020.12
5.5.90.0030.07720.07
5.5.80.0030.08020.12
5.5.70.0030.08020.13
5.5.60.0070.07320.05
5.5.50.0130.06720.13
5.5.40.0000.07320.08
5.5.30.0100.07019.95
5.5.20.0030.07020.10
5.5.10.0270.05320.06
5.5.00.0030.04020.12
5.4.450.0100.03719.50
5.4.440.0030.07319.27
5.4.430.0030.04719.32
5.4.420.0070.07719.36
5.4.410.0000.06019.32
5.4.400.0030.07019.10
5.4.390.0000.08019.18
5.4.380.0130.06718.95
5.4.370.0070.05318.89
5.4.360.0070.07318.88
5.4.350.0030.05019.12
5.4.340.0100.05019.13
5.4.320.0070.06719.21
5.4.310.0130.04719.03
5.4.300.0030.08018.91
5.4.290.0030.08019.13
5.4.280.0070.07319.14
5.4.270.0070.07719.04
5.4.260.0030.06319.09
5.4.250.0130.07019.12
5.4.240.0130.06018.84
5.4.230.0000.04719.03
5.4.220.0100.05719.04
5.4.210.0070.07019.03
5.4.200.0070.05719.21
5.4.190.0130.06319.11
5.4.180.0030.07319.03
5.4.170.0030.05319.03
5.4.160.0100.04718.93
5.4.150.0030.08319.11
5.4.140.0030.05016.40
5.4.130.0130.05016.39
5.4.120.0070.07316.29
5.4.110.0100.06316.45
5.4.100.0100.06716.34
5.4.90.0030.08316.45
5.4.80.0070.07316.32
5.4.70.0100.06716.30
5.4.60.0070.07016.34
5.4.50.0000.07316.25
5.4.40.0070.06716.39
5.4.30.0030.06716.42
5.4.20.0030.04016.33
5.4.10.0070.07016.48
5.4.00.0070.07315.71
5.3.290.0030.07014.66
5.3.280.0000.07714.75
5.3.270.0030.07314.58
5.3.260.0030.08014.59
5.3.250.0030.04714.60
5.3.240.0070.07014.64
5.3.230.0030.04314.62
5.3.220.0100.07014.59
5.3.210.0030.07314.68
5.3.200.0030.07314.51
5.3.190.0070.07714.63
5.3.180.0100.07314.70
5.3.170.0070.08014.55
5.3.160.0070.05314.64
5.3.150.0000.05314.61
5.3.140.0070.07014.71
5.3.130.0070.05314.58
5.3.120.0030.06714.54
5.3.110.0000.05314.52
5.3.100.0000.07714.02
5.3.90.0030.07014.08
5.3.80.0000.07314.08
5.3.70.0000.04314.17
5.3.60.0100.04713.94
5.3.50.0030.07314.04
5.3.40.0030.05313.88
5.3.30.0030.07313.95
5.3.20.0100.04713.81
5.3.10.0030.07013.66
5.3.00.0070.05713.54
5.2.170.0070.05711.30
5.2.160.0000.06311.22
5.2.150.0030.05011.30
5.2.140.0030.05011.05
5.2.130.0070.03311.17
5.2.120.0070.04711.03
5.2.110.0000.04711.14
5.2.100.0070.03711.03
5.2.90.0000.04310.98
5.2.80.0030.06311.16
5.2.70.0030.06010.97
5.2.60.0000.05710.92
5.2.50.0030.03711.02
5.2.40.0030.06011.07
5.2.30.0000.07011.13
5.2.20.0070.05711.09
5.2.10.0000.06310.92
5.2.00.0070.05710.88
5.1.60.0000.04310.27
5.1.50.0030.05310.27
5.1.40.0030.05310.27
5.1.30.0030.05310.50
5.1.20.0070.05310.42
5.1.10.0070.02310.27
5.1.00.0030.05310.27
5.0.50.0030.02710.27
5.0.40.0000.03310.27
5.0.30.0000.06310.27
5.0.20.0100.03710.27
5.0.10.0030.04010.27
5.0.00.0000.03710.27
4.4.90.0000.03710.27
4.4.80.0030.02310.27
4.4.70.0000.03310.27
4.4.60.0000.02710.27
4.4.50.0000.03010.27
4.4.40.0000.04310.27
4.4.30.0000.03710.27
4.4.20.0000.04010.27
4.4.10.0000.02010.27
4.4.00.0000.05010.27
4.3.110.0070.03010.27
4.3.100.0000.02710.27
4.3.90.0000.02710.27
4.3.80.0000.05010.27
4.3.70.0030.02710.27
4.3.60.0030.02010.27
4.3.50.0000.03710.27
4.3.40.0000.04010.27
4.3.30.0000.02710.27
4.3.20.0000.02310.27
4.3.10.0000.02310.27
4.3.00.0030.01310.27

preferences:
62.85 ms | 400 KiB | 5 Q