3v4l.org

run code in 300+ PHP versions simultaneously
<?php function countDaysForChoosenYears(int $year):int { $att = []; for ($i = 1; $i <= 12; $i++) { $att[] = cal_days_in_month(CAL_GREGORIAN, $i, $year); } $att = array_sum($att); return $att; } $YearMonthDayStructure = []; $Date = new DateTime('2016-01-01'); for ($i = 1; $i <= countDaysForChoosenYears(2016); $i++) { $monthName = $Date->format('F'); $yearNumber = $Date->format('Y'); $YearMonthDayStructure[$yearNumber][$monthName][$Date->format('d')] = $Date->format('Y-m-d'); $Date->add(new DateInterval('P1D')); } print_r($YearMonthDayStructure);

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.4.20.0170.00317.89
8.4.10.0130.00718.04
8.3.150.0040.00419.05
8.3.140.0140.00416.86
8.3.130.0130.00318.69
8.3.120.0040.00419.05
8.3.110.0060.00320.94
8.3.100.0000.00816.88
8.3.90.0110.00726.77
8.3.80.0060.00318.68
8.3.70.0000.01418.31
8.3.60.0100.01016.75
8.3.50.0130.00721.14
8.3.40.0120.00319.10
8.3.30.0040.01118.84
8.3.20.0060.00618.85
8.3.10.0040.00421.61
8.3.00.0040.00420.84
8.2.270.0110.00717.45
8.2.260.0060.01220.34
8.2.250.0030.00518.48
8.2.240.0070.00717.13
8.2.230.0040.00422.58
8.2.220.0060.00337.54
8.2.210.0030.00526.77
8.2.200.0120.00018.67
8.2.190.0190.00018.51
8.2.180.0100.00718.41
8.2.170.0070.01422.96
8.2.160.0040.01120.55
8.2.150.0030.00524.18
8.2.140.0030.00524.66
8.2.130.0050.00221.13
8.2.120.0040.00426.35
8.2.110.0090.00019.14
8.2.100.0090.00318.04
8.2.90.0040.00419.17
8.2.80.0040.00417.97
8.2.70.0060.00317.88
8.2.60.0060.00318.03
8.2.50.0030.00518.10
8.2.40.0080.00022.38
8.2.30.0000.00720.72
8.2.20.0000.00817.80
8.2.10.0040.00418.25
8.2.00.0040.00418.13
8.1.310.0110.00418.68
8.1.300.0060.00318.86
8.1.290.0100.00018.88
8.1.280.0090.00625.92
8.1.270.0050.00323.92
8.1.260.0080.00028.09
8.1.250.0070.00028.09
8.1.240.0060.00319.25
8.1.230.0040.00717.77
8.1.220.0040.00417.80
8.1.210.0050.00318.77
8.1.200.0030.00617.35
8.1.190.0000.00817.38
8.1.180.0030.00618.10
8.1.170.0030.00518.62
8.1.160.0040.00419.12
8.1.150.0040.00418.91
8.1.140.0040.00419.61
8.1.130.0000.00717.67
8.1.120.0050.00317.57
8.1.110.0030.00617.64
8.1.100.0000.00717.50
8.1.90.0000.00817.65
8.1.80.0000.00817.65
8.1.70.0000.00717.39
8.1.60.0000.00817.63
8.1.50.0030.00617.55
8.1.40.0000.00817.67
8.1.30.0000.00917.70
8.1.20.0000.00817.82
8.1.10.0050.00317.56
8.1.00.0070.00317.74
8.0.300.0070.00018.77
8.0.290.0030.00717.00
8.0.280.0000.00718.39
8.0.270.0040.00417.30
8.0.260.0000.00617.32
8.0.250.0040.00417.23
8.0.240.0000.00717.05
8.0.230.0030.00317.08
8.0.220.0060.00417.13
8.0.210.0070.00017.14
8.0.200.0030.00317.07
8.0.190.0080.00017.19
8.0.180.0000.00717.15
8.0.170.0000.00817.04
8.0.160.0050.00317.05
8.0.150.0040.00717.07
8.0.140.0040.00416.97
8.0.130.0050.00013.55
8.0.120.0030.00617.12
8.0.110.0000.00817.10
8.0.100.0000.00717.18
8.0.90.0030.00316.92
8.0.80.0060.00917.05
8.0.70.0000.00817.18
8.0.60.0000.00817.00
8.0.50.0040.00416.99
8.0.30.0110.00817.31
8.0.20.0090.01217.40
8.0.10.0080.00017.17
8.0.00.0110.01116.77
7.4.330.0020.00215.08
7.4.320.0060.00016.73
7.4.300.0030.00316.77
7.4.290.0070.00016.58
7.4.280.0000.00816.76
7.4.270.0030.00316.78
7.4.260.0040.00416.75
7.4.250.0080.00016.59
7.4.240.0040.00416.75
7.4.230.0040.00416.65
7.4.220.0130.00716.64
7.4.210.0060.00916.60
7.4.200.0040.00416.70
7.4.160.0100.00716.96
7.4.150.0130.00617.40
7.4.140.0090.01017.86
7.4.130.0060.01116.65
7.4.120.0090.00816.74
7.4.110.0100.00616.66
7.4.100.0070.01416.72
7.4.90.0090.00916.75
7.4.80.0140.00719.39
7.4.70.0100.01316.71
7.4.60.0080.00816.72
7.4.50.0040.01116.89
7.4.40.0090.00916.61
7.4.30.0070.01016.64
7.4.00.0050.01014.93
7.3.330.0020.00713.30
7.3.320.0030.00313.32
7.3.310.0050.00216.52
7.3.300.0000.00716.46
7.3.290.0070.00916.52
7.3.280.0110.00416.48
7.3.270.0100.00717.40
7.3.260.0070.01116.71
7.3.250.0110.00816.57
7.3.240.0110.00816.54
7.3.230.0170.01016.71
7.3.210.0090.00916.62
7.3.200.0100.00716.57
7.3.190.0160.00016.62
7.3.180.0150.00316.60
7.3.170.0030.01316.51
7.3.160.0100.01016.46
7.3.120.0120.00615.01
7.3.110.0070.01115.20
7.3.100.0040.01615.03
7.3.90.0040.00815.16
7.3.80.0030.00915.16
7.3.70.0030.00615.06
7.3.60.0070.01014.80
7.3.50.0070.00714.94
7.3.40.0060.00614.94
7.3.30.0000.00914.83
7.3.20.0110.00316.78
7.3.10.0050.00716.72
7.3.00.0080.00516.80
7.2.330.0090.00916.88
7.2.320.0120.01216.59
7.2.310.0130.00416.77
7.2.300.0090.00916.90
7.2.290.0060.01216.55
7.2.250.0120.00615.37
7.2.240.0100.01015.26
7.2.230.0030.01415.09
7.2.220.0100.00315.18
7.2.210.0000.01515.24
7.2.200.0060.00315.13
7.2.190.0000.01515.11
7.2.180.0040.01115.35
7.2.170.0100.00615.17
7.2.130.0080.00416.77
7.2.120.0150.00016.83
7.2.110.0170.00016.65
7.2.100.0040.00916.91
7.2.90.0040.00817.09
7.2.80.0090.00616.84
7.2.70.0150.00617.00
7.2.60.0070.00517.01
7.2.50.0100.00717.13
7.2.40.0080.00616.88
7.2.30.0120.00917.01
7.2.20.0160.00016.76
7.2.10.0110.00817.13
7.2.00.0090.00718.19
7.1.330.0060.01215.92
7.1.320.0000.01315.92
7.1.310.0070.00715.79
7.1.300.0070.01015.83
7.1.290.0060.01015.41
7.1.280.0060.00615.72
7.1.270.0070.00415.90
7.1.260.0070.00715.90
7.1.250.0160.00315.86
7.1.200.0000.01215.75
7.1.100.0030.00718.36
7.1.70.0030.00617.42
7.1.60.0100.01720.41
7.1.50.0070.01317.18
7.1.00.0030.08022.31
7.0.200.0370.01015.14
7.0.60.0170.08021.71
7.0.50.0070.04318.03
7.0.40.0270.05720.48
7.0.30.0270.07020.45
7.0.20.0430.07720.49
7.0.10.0400.08020.30
7.0.00.0270.08020.37
5.6.280.0000.07321.06
5.6.210.0130.06720.64
5.6.200.0100.06718.29
5.6.190.0230.05721.02
5.6.180.0230.05021.07
5.6.170.0270.05321.11
5.6.160.0230.06021.05
5.6.150.0130.08021.09
5.6.140.0270.06321.11
5.6.130.0370.07721.09
5.6.120.0330.06321.02
5.6.110.0530.06021.06
5.6.100.0430.05321.06
5.6.90.0300.08021.07
5.6.80.0270.06320.32
5.6.70.0500.05020.46
5.6.60.0330.04720.37
5.6.50.0300.06720.48
5.6.40.0530.06020.43
5.6.30.0300.07320.32
5.6.20.0100.07320.43
5.6.10.0230.05020.46
5.6.00.0530.07720.50
5.5.350.0230.06720.52
5.5.340.0100.07718.02
5.5.330.0070.06720.75
5.5.320.0230.04720.86
5.5.310.0100.06320.95
5.5.300.0330.04720.82
5.5.290.0230.05720.83
5.5.280.0300.08020.88
5.5.270.0100.07720.92
5.5.260.0530.06020.74
5.5.250.0270.05720.66
5.5.240.0100.08320.33
5.5.230.0400.05720.22
5.5.220.0270.05720.33
5.5.210.0170.06020.15
5.5.200.0200.07320.32
5.5.190.0370.08020.23
5.5.180.1170.07320.18
5.5.160.0600.07020.11
5.5.150.0430.06720.20
5.5.140.0530.06020.00
5.5.130.0630.07020.09
5.5.120.0300.06020.19
5.5.110.0430.06020.00
5.5.100.0670.06720.04
5.5.90.0230.05020.03
5.5.80.0470.05020.12
5.5.70.0430.05020.11
5.5.60.0370.05720.09
5.5.50.0500.04320.07
5.5.40.0300.06320.00
5.5.30.0300.05720.10
5.5.20.0370.06020.10
5.5.10.0300.06020.17
5.5.00.0230.05020.11

preferences:
29.64 ms | 403 KiB | 5 Q