3v4l.org

run code in 300+ PHP versions simultaneously
<?php function daysInMonth($month, $year) { $daysBetweenMonths = [0, 31, 59 + ($year%4 === 0), 90, 120, 151, 181, 212, 243, 273, 304, 334, 365]; $prev = $daysBetweenMonths[$month - 2]; $current = $daysBetweenMonths[$month - 1]; return $current - $prev; } for ($y = 2000; $y < 2004; $y++) { for ($m = 1; $m < 13; $m++) { echo 'dais in '.$m.'/'.$y.' are :'. daysInMonth($m, $y)."\n"; } echo "\n\n"; }

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.70.0090.00616.63
8.3.60.0110.00718.25
8.3.50.0130.00822.11
8.3.40.0110.00718.96
8.3.30.0120.00318.80
8.3.20.0080.00018.95
8.3.10.0040.00421.04
8.3.00.0040.00419.69
8.2.180.0100.01016.50
8.2.170.0120.00322.96
8.2.160.0070.00720.42
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0040.00420.97
8.2.110.0110.00022.08
8.2.100.0090.00317.84
8.2.90.0050.00319.36
8.2.80.0080.00019.21
8.2.70.0030.00917.50
8.2.60.0000.00817.93
8.2.50.0030.00618.07
8.2.40.0040.00418.16
8.2.30.0000.00821.21
8.2.20.0040.00417.65
8.2.10.0000.00717.92
8.2.00.0060.00317.82
8.1.280.0040.01625.92
8.1.270.0090.00023.99
8.1.260.0000.00926.35
8.1.250.0080.00028.09
8.1.240.0050.01020.81
8.1.230.0050.00520.85
8.1.220.0000.00818.77
8.1.210.0000.00818.97
8.1.200.0030.00617.22
8.1.190.0000.00817.18
8.1.180.0040.00418.10
8.1.170.0050.00318.58
8.1.160.0060.00318.84
8.1.150.0040.00418.64
8.1.140.0050.00417.45
8.1.130.0080.00017.76
8.1.120.0050.00317.38
8.1.110.0030.00717.35
8.1.100.0040.00417.48
8.1.90.0000.00717.34
8.1.80.0020.00517.40
8.1.70.0000.00717.41
8.1.60.0030.00617.54
8.1.50.0000.00717.48
8.1.40.0040.00417.53
8.1.30.0020.00517.63
8.1.20.0040.00417.70
8.1.10.0030.00617.63
8.1.00.0060.00317.46
8.0.300.0000.00819.86
8.0.290.0040.00417.05
8.0.280.0040.00418.36
8.0.270.0030.00317.29
8.0.260.0070.00016.89
8.0.250.0040.00417.02
8.0.240.0060.00317.02
8.0.230.0040.00417.00
8.0.220.0000.00716.98
8.0.210.0000.00716.85
8.0.200.0060.00016.95
8.0.190.0020.00516.89
8.0.180.0000.00717.01
8.0.170.0030.00617.02
8.0.160.0000.00816.95
8.0.150.0050.00216.89
8.0.140.0000.00716.82
8.0.130.0030.00313.38
8.0.120.0000.00816.85
8.0.110.0050.00316.79
8.0.100.0000.00817.01
8.0.90.0050.00316.90
8.0.80.0140.00316.94
8.0.70.0000.00716.98
8.0.60.0040.00416.91
8.0.50.0000.00717.01
8.0.30.0170.00217.26
8.0.20.0120.01117.40
8.0.10.0000.00716.95
8.0.00.0090.00916.76
7.4.330.0000.00516.83
7.4.320.0000.00616.65
7.4.300.0030.00316.49
7.4.290.0030.00316.55
7.4.280.0030.00316.54
7.4.270.0000.00716.52
7.4.260.0000.00513.22
7.4.250.0000.00816.51
7.4.240.0030.00316.65
7.4.230.0030.00316.44
7.4.220.0130.01416.57
7.4.210.0100.00416.58
7.4.200.0000.00716.71
7.4.190.0000.00716.73
7.4.160.0110.00616.63
7.4.150.0110.00717.40
7.4.140.0050.01317.86
7.4.130.0060.01116.62
7.4.120.0120.00516.59
7.4.110.0030.01416.57
7.4.100.0070.01016.47
7.4.90.0120.00616.44
7.4.80.0100.00719.39
7.4.70.0090.00916.53
7.4.60.0140.00316.59
7.4.50.0040.00416.39
7.4.40.0100.00722.77
7.4.30.0070.01316.55
7.4.00.0060.01014.75
7.3.330.0000.00513.50
7.3.320.0060.00013.41
7.3.310.0000.00716.18
7.3.300.0030.00316.38
7.3.290.0110.01116.34
7.3.280.0120.00616.37
7.3.270.0170.00317.40
7.3.260.0080.01218.24
7.3.250.0070.01016.56
7.3.240.0140.00316.45
7.3.230.0130.00416.39
7.3.210.0100.00916.57
7.3.200.0030.01419.39
7.3.190.0090.01016.64
7.3.180.0060.01016.61
7.3.170.0030.01316.61
7.3.160.0090.00616.47
7.3.120.0030.01414.98
7.3.10.0080.00516.70
7.3.00.0080.00516.63
7.2.330.0140.00516.83
7.2.320.0060.01716.80
7.2.310.0060.01916.71
7.2.300.0100.01316.81
7.2.290.0080.00816.84
7.2.130.0060.00917.05
7.2.120.0050.00717.04
7.2.110.0070.00816.84
7.2.100.0050.00617.03
7.2.90.0080.00917.06
7.2.80.0070.00816.81
7.2.70.0040.00616.93
7.2.60.0020.01217.11
7.2.50.0080.00716.93
7.2.40.0080.00716.86
7.2.30.0050.01116.76
7.2.20.0040.01317.02
7.2.10.0040.00916.94
7.2.00.0080.00717.77
7.1.250.0070.00515.72
7.1.100.0030.01218.43
7.1.70.0050.00317.25
7.1.60.0040.00717.32
7.1.50.0030.01016.93
7.1.00.0030.03722.43
7.0.200.0000.01616.69
7.0.140.0030.07022.12
7.0.60.0100.08019.86
7.0.50.0100.06317.87
7.0.40.0100.08320.21
7.0.30.0230.05320.34
7.0.20.0230.05020.20
7.0.10.0400.07720.29
7.0.00.0030.08720.02
5.6.280.0030.07321.07
5.6.210.0100.04020.63
5.6.200.0000.05318.18
5.6.190.0070.04720.62
5.6.180.0370.07320.60
5.6.170.0330.06320.71
5.6.160.0030.06320.47
5.6.150.0070.05718.27
5.6.140.0100.07318.15
5.6.130.0100.07318.16
5.6.120.0070.04020.99
5.6.110.0070.08020.98
5.6.100.0100.06321.01
5.6.90.0200.07721.13
5.6.80.0100.07320.40
5.6.70.0470.04320.37
5.5.350.0230.08020.47
5.5.340.0070.08317.93
5.5.330.0100.07320.19
5.5.320.0270.04720.41
5.5.310.0200.06720.23
5.5.300.0100.07318.03
5.5.290.0030.08317.95
5.5.280.0030.04020.78
5.5.270.0100.07020.64
5.5.260.0030.05320.68
5.5.250.0030.08720.78
5.5.240.0200.07720.29
5.4.450.3130.04019.18
5.4.440.3300.04319.41
5.4.430.3670.04019.60
5.4.420.3400.03719.55
5.4.410.3370.04319.18
5.4.400.3600.04719.15
5.4.390.3100.03719.16
5.4.380.3100.04019.24
5.4.370.3500.03319.14
5.4.360.3400.04019.04
5.4.350.3170.03319.04
5.4.340.3470.03019.15
5.4.320.3600.03719.05
5.4.310.4030.03319.18
5.4.300.3500.03719.19
5.4.290.3200.03719.07
5.4.280.3330.03719.18
5.4.270.3400.04019.28
5.4.260.3430.04319.19
5.4.250.3900.04019.09
5.4.240.3470.04018.86
5.4.230.3570.03319.23
5.4.220.3000.03719.09
5.4.210.3200.03719.28
5.4.200.3400.04019.10
5.4.190.3670.04019.15
5.4.180.3400.03719.13
5.4.170.3500.04319.19
5.4.160.3230.04318.84
5.4.150.3330.04019.13
5.4.140.3670.03316.36
5.4.130.3230.03316.49
5.4.120.3270.03716.29
5.4.110.4000.03316.52
5.4.100.3670.03716.35
5.4.90.3570.03716.46
5.4.80.3970.02716.25
5.4.70.3470.03716.43
5.4.60.0000.08016.43
5.4.50.2000.05016.53
5.4.40.4070.03016.29
5.4.30.4070.03716.16
5.4.20.3800.03316.50
5.4.10.4070.03716.43
5.4.00.4100.03316.01
5.3.290.3970.03714.59
5.3.280.3130.04014.51
5.3.270.4300.03714.53
5.3.260.3270.03714.63
5.3.250.3200.03314.77
5.3.240.3500.03714.60
5.3.230.3630.04014.51
5.3.220.3170.03714.47
5.3.210.3530.03714.58
5.3.200.3900.02714.54
5.3.190.4000.03314.69
5.3.180.3970.04314.54
5.3.170.3930.03714.64
5.3.160.0030.08014.54
5.3.150.0000.04714.48
5.3.140.3730.04014.53
5.3.130.3830.03314.45
5.3.120.3930.03714.46
5.3.110.3870.04014.57
5.3.100.3870.04014.05
5.3.90.4030.03313.96
5.3.80.3100.03013.94
5.3.70.3230.03314.03
5.3.60.3170.04014.22
5.3.50.3230.03314.02
5.3.40.3000.03314.03
5.3.30.3400.02713.98
5.3.20.0030.03313.91
5.3.10.0530.03713.72
5.3.00.3230.03013.54
5.2.170.2670.03011.22
5.2.160.2830.03311.06
5.2.150.2930.03011.26
5.2.140.3030.03011.05
5.2.130.0000.03311.03
5.2.120.0000.03011.01
5.2.110.2670.02711.01
5.2.100.2300.02711.21
5.2.90.2230.02011.02
5.2.80.2200.02311.12
5.2.70.3100.03711.09
5.2.60.2670.03010.96
5.2.50.3000.03011.22
5.2.40.2400.02311.21
5.2.30.2400.03310.88
5.2.20.2430.03010.86
5.2.10.2400.02710.78
5.2.00.2170.03010.69
5.1.60.2470.02710.09
5.1.50.2500.0279.88
5.1.40.2830.02710.13
5.1.30.2470.03010.43
5.1.20.2500.02710.52
5.1.10.2930.02310.04
5.1.00.2570.02010.05
5.0.50.1470.0308.43
5.0.40.1300.0178.46
5.0.30.1500.0338.30
5.0.20.1600.0178.21
5.0.10.1600.0178.39
5.0.00.1300.0308.23
4.4.90.1070.0137.01
4.4.80.1230.0177.01
4.4.70.1300.0137.01
4.4.60.1170.0177.01
4.4.50.1070.0177.01
4.4.40.1330.0307.01
4.4.30.1430.0177.01
4.4.20.1630.0137.01
4.4.10.1600.0137.01
4.4.00.1530.0277.01
4.3.110.1270.0137.01
4.3.100.1470.0207.01
4.3.90.1430.0137.01
4.3.80.1570.0177.01
4.3.70.1600.0177.01
4.3.60.1530.0137.01
4.3.50.1530.0207.01
4.3.40.1770.0237.01
4.3.30.0530.0307.01
4.3.20.0830.0177.01
4.3.10.0730.0137.01
4.3.00.0900.0207.01

preferences:
41.62 ms | 401 KiB | 5 Q