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->add(new DateInterval('P1D'))->format('Y-m-d'); } 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.3.60.0210.00016.87
8.3.50.0090.00821.21
8.3.40.0180.00319.04
8.3.30.0060.00919.04
8.3.20.0060.00318.99
8.3.10.0040.00421.59
8.3.00.0000.00720.72
8.2.180.0090.01225.92
8.2.170.0100.00719.04
8.2.160.0070.00722.02
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0080.00021.18
8.2.120.0070.00026.35
8.2.110.0070.00322.30
8.2.100.0060.00618.04
8.2.90.0000.00918.28
8.2.80.0040.00417.97
8.2.70.0060.00318.04
8.2.60.0040.00418.04
8.2.50.0000.00818.10
8.2.40.0030.00620.42
8.2.30.0040.00420.65
8.2.20.0000.00817.84
8.2.10.0070.00018.14
8.2.00.0040.00418.06
8.1.280.0060.00925.92
8.1.270.0030.00523.81
8.1.260.0070.00028.09
8.1.250.0040.00428.09
8.1.240.0050.00523.97
8.1.230.0080.00422.75
8.1.220.0080.00017.80
8.1.210.0080.00020.26
8.1.200.0030.00617.48
8.1.190.0060.00617.60
8.1.180.0080.00018.10
8.1.170.0050.00318.66
8.1.160.0000.00722.12
8.1.150.0040.00418.84
8.1.140.0050.00219.66
8.1.130.0030.00317.74
8.1.120.0040.00417.54
8.1.110.0030.00517.68
8.1.100.0050.00217.54
8.1.90.0060.00317.52
8.1.80.0000.00717.65
8.1.70.0040.00417.57
8.1.60.0030.00617.74
8.1.50.0040.00417.66
8.1.40.0040.00417.56
8.1.30.0040.00417.65
8.1.20.0070.00017.86
8.1.10.0040.00417.52
8.1.00.0000.01017.74
8.0.300.0000.00719.91
8.0.290.0040.00417.00
8.0.280.0030.00318.50
8.0.270.0000.00717.23
8.0.260.0000.00717.29
8.0.250.0000.00817.13
8.0.240.0040.00417.17
8.0.230.0050.00217.26
8.0.220.0100.00016.98
8.0.210.0000.00817.04
8.0.200.0030.00317.08
8.0.190.0040.00417.23
8.0.180.0000.00717.16
8.0.170.0000.00817.11
8.0.160.0000.00717.10
8.0.150.0100.00017.05
8.0.140.0000.00717.13
8.0.130.0060.00013.41
8.0.120.0050.00317.08
8.0.110.0040.00417.04
8.0.100.0040.00416.98
8.0.90.0000.00717.06
8.0.80.0090.00617.15
8.0.70.0020.00517.18
8.0.60.0040.00417.03
8.0.50.0040.00417.08
8.0.30.0070.00917.43
8.0.20.0120.00717.41
8.0.10.0070.00017.30
8.0.00.0080.01116.97
7.4.330.0020.00215.08
7.4.320.0030.00316.66
7.4.300.0030.00316.63
7.4.290.0030.00316.74
7.4.280.0000.00716.71
7.4.270.0070.00016.57
7.4.260.0120.00016.60
7.4.250.0000.00816.78
7.4.240.0050.00216.75
7.4.230.0030.00316.57
7.4.220.0030.01916.84
7.4.210.0040.01016.71
7.4.200.0000.00716.71
7.4.160.0060.01016.80
7.4.150.0110.00517.40
7.4.140.0110.00717.86
7.4.130.0080.01016.67
7.4.120.0080.00816.73
7.4.110.0070.01016.76
7.4.100.0190.00316.68
7.4.90.0100.01416.92
7.4.80.0070.01419.39
7.4.70.0090.00916.68
7.4.60.0090.00916.85
7.4.50.0110.00716.71
7.4.40.0200.00316.55
7.4.30.0140.00416.77
7.4.00.0030.00915.03
7.3.330.0050.00213.48
7.3.320.0060.00013.45
7.3.310.0030.00316.41
7.3.300.0050.00316.55
7.3.290.0100.00716.53
7.3.280.0100.00816.47
7.3.270.0190.00317.40
7.3.260.0070.01016.52
7.3.250.0090.01116.59
7.3.240.0110.00716.73
7.3.230.0090.00916.53
7.3.210.0140.00716.74
7.3.200.0140.00316.74
7.3.190.0060.00916.68
7.3.180.0100.01016.64
7.3.170.0060.01016.50
7.3.160.0130.00716.61
7.2.330.0110.00816.68
7.2.320.0090.01216.72
7.2.310.0180.00016.68
7.2.300.0110.00616.83
7.2.290.0100.01316.62
7.2.60.0070.00717.11
7.2.00.0060.01019.72
7.1.200.0040.00715.84
7.1.100.0030.01018.57
7.1.70.0060.00617.38
7.1.60.0060.02220.41
7.1.50.0070.01417.23
7.1.00.0070.07322.35
7.0.200.0410.01015.19
7.0.60.0270.07321.81
7.0.50.0130.07717.91
7.0.40.0500.06020.49
7.0.30.0500.07320.46
7.0.20.0470.07020.31
7.0.10.0430.07320.43
7.0.00.0500.04720.45
5.6.280.0070.07020.93
5.6.210.0030.08320.64
5.6.200.0030.07318.16
5.6.190.0170.07321.15
5.6.180.0470.05021.11
5.6.170.0300.06321.15
5.6.160.0330.05321.05
5.6.150.0330.05721.10
5.6.140.0300.06321.07
5.6.130.0370.06321.05
5.6.120.0200.05321.05
5.6.110.0070.06021.02
5.6.100.0400.06021.03
5.6.90.0370.05321.13
5.6.80.0400.06320.48
5.6.70.0400.05020.46
5.6.60.0330.05720.52
5.6.50.0470.05020.49
5.6.40.0500.04720.48
5.6.30.0400.04720.41
5.6.20.0270.06020.43
5.6.10.0100.05320.44
5.6.00.0130.07720.46
5.5.350.0230.03320.38
5.5.340.0070.05318.05
5.5.330.0270.06320.88
5.5.320.0230.07020.88
5.5.310.0300.06020.84
5.5.300.0430.05320.90
5.5.290.0300.04720.84
5.5.280.0030.07021.03
5.5.270.0130.05321.00
5.5.260.0170.06020.92
5.5.250.0330.06320.68
5.5.240.0430.05020.41
5.5.230.0370.05720.32
5.5.220.0370.04720.35
5.5.210.0330.06020.26
5.5.200.0330.06320.29
5.5.190.0400.05720.22
5.5.180.0330.06020.04
5.5.160.0230.05720.28
5.5.150.0430.04720.38
5.5.140.0200.06320.19
5.5.130.0330.05320.19
5.5.120.0400.05020.27
5.5.110.0300.06320.22
5.5.100.0300.05320.19
5.5.90.0400.05320.03
5.5.80.0430.05319.91
5.5.70.0400.05320.14
5.5.60.0400.05320.09
5.5.50.0430.05020.02
5.5.40.0330.06020.13
5.5.30.0330.05319.91
5.5.20.0430.05020.11
5.5.10.0500.04320.13
5.5.00.0370.05720.13

preferences:
61.34 ms | 401 KiB | 5 Q