3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start = (new DateTime('1 year ago'))->modify('first day of the month'); $end = (new DateTime())->modify('first day of the month'); $interval = new DateInterval('P1M'); $period = new DatePeriod($start, $interval, $end); $months = array(); foreach ($period as $dt) { $months[] = $dt->format('Y-m-d'); } $reverse_months = array_reverse($months); print_r($reverse_months);

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.00718.56
8.3.50.0090.00922.05
8.3.40.0040.01118.81
8.3.30.0090.00619.24
8.3.20.0040.00420.34
8.3.10.0060.00321.93
8.3.00.0050.00222.37
8.2.180.0090.00916.75
8.2.170.0110.00422.96
8.2.160.0140.00021.07
8.2.150.0000.00824.18
8.2.140.0000.00824.66
8.2.130.0040.01126.16
8.2.120.0090.00019.63
8.2.110.0060.00322.18
8.2.100.0080.00317.97
8.2.90.0080.00019.30
8.2.80.0000.00817.97
8.2.70.0000.00817.88
8.2.60.0060.00317.93
8.2.50.0080.00318.07
8.2.40.0050.00318.34
8.2.30.0090.00018.11
8.2.20.0070.00018.04
8.2.10.0000.00818.09
8.2.00.0030.00617.92
8.1.280.0090.00925.92
8.1.270.0040.00422.21
8.1.260.0050.00326.35
8.1.250.0080.00028.09
8.1.240.0040.00822.08
8.1.230.0090.00324.03
8.1.220.0040.00417.79
8.1.210.0050.00318.77
8.1.200.0060.00617.60
8.1.190.0040.00417.55
8.1.180.0060.00318.90
8.1.170.0040.00418.72
8.1.160.0040.00421.96
8.1.150.0000.00718.71
8.1.140.0070.00017.68
8.1.130.0000.00717.82
8.1.120.0070.00317.59
8.1.110.0040.00417.64
8.1.100.0040.00417.56
8.1.90.0000.00717.73
8.1.80.0070.00017.72
8.1.70.0030.00317.70
8.1.60.0000.00817.73
8.1.50.0040.00417.75
8.1.40.0040.00417.77
8.1.30.0030.00617.68
8.1.20.0050.00317.71
8.1.10.0000.00817.79
8.1.00.0030.00517.86
8.0.300.0070.00018.77
8.0.290.0050.00317.13
8.0.280.0000.00718.47
8.0.270.0070.00017.27
8.0.260.0000.00716.99
8.0.250.0050.00317.27
8.0.240.0000.00717.16
8.0.230.0000.00717.23
8.0.220.0000.00817.10
8.0.210.0030.00317.20
8.0.200.0030.00317.27
8.0.190.0080.00017.23
8.0.180.0070.00017.22
8.0.170.0030.00617.16
8.0.160.0040.00417.14
8.0.150.0050.00217.19
8.0.140.0040.00417.18
8.0.130.0000.00513.52
8.0.120.0040.00417.13
8.0.110.0070.00017.08
8.0.100.0060.00316.98
8.0.90.0000.00717.19
8.0.80.0080.01117.18
8.0.70.0000.00717.06
8.0.60.0000.00717.00
8.0.50.0040.00417.25
8.0.30.0120.01117.21
8.0.20.0090.01017.40
8.0.10.0000.00717.09
8.0.00.0080.01016.99
7.4.330.0000.00615.09
7.4.320.0060.00016.59
7.4.300.0050.00216.59
7.4.290.0000.00816.86
7.4.280.0030.00316.74
7.4.270.0030.00616.80
7.4.260.0070.00016.77
7.4.250.0030.00616.60
7.4.240.0040.00316.79
7.4.230.0030.00516.63
7.4.220.0090.00916.86
7.4.210.0050.01016.81
7.4.200.0030.00316.84
7.4.190.0030.00316.95
7.4.160.0110.00516.86
7.4.150.0150.00617.40
7.4.140.0100.01017.86
7.4.130.0140.00816.84
7.4.120.0120.00716.81
7.4.110.0060.01116.73
7.4.100.0140.01116.70
7.4.90.0100.01316.61
7.4.80.0120.00619.39
7.4.70.0100.01416.59
7.4.60.0100.00716.77
7.4.50.0040.00416.35
7.4.40.0090.00622.77
7.4.30.0130.00316.84
7.4.00.0100.00615.28
7.3.330.0000.00513.38
7.3.320.0000.00513.20
7.3.310.0040.00416.57
7.3.300.0000.00716.55
7.3.290.0080.00816.45
7.3.280.0070.00916.50
7.3.270.0070.01017.40
7.3.260.0000.01716.61
7.3.250.0110.00616.72
7.3.240.0100.00716.81
7.3.230.0120.00916.50
7.3.210.0160.00316.65
7.3.200.0080.00819.39
7.3.190.0070.01016.75
7.3.180.0030.01316.82
7.3.170.0100.00616.68
7.3.160.0080.00816.71
7.3.120.0030.01314.93
7.3.10.0060.00616.70
7.3.00.0000.00916.71
7.2.330.0090.00917.04
7.2.320.0070.01017.01
7.2.310.0150.00616.86
7.2.300.0060.01216.66
7.2.290.0140.00716.82
7.2.130.0050.00517.02
7.2.120.0030.00917.12
7.2.110.0000.01016.96
7.2.100.0030.01417.06
7.2.90.0030.01217.07
7.2.80.0030.00617.16
7.2.70.0090.00617.04
7.2.60.0070.01817.13
7.2.50.0100.00317.09
7.2.40.0110.00017.11
7.2.30.0030.00917.08
7.2.20.0040.00816.68
7.2.10.0090.00316.84
7.2.00.0050.00618.19
7.1.250.0030.00915.57
7.1.200.0040.00815.79
7.1.100.0080.00318.19
7.1.70.0080.00017.50
7.1.60.0140.01019.82
7.1.50.0000.01117.16
7.1.00.0100.07022.43
7.0.200.0090.00316.90
7.0.140.0030.07321.93
7.0.60.0070.06020.04
7.0.50.0070.05717.96
7.0.40.0100.08720.20
7.0.30.0300.08320.13
7.0.20.0230.08320.16
7.0.10.0000.09720.18
7.0.00.0200.07320.16
5.6.280.0000.07720.93
5.6.210.0070.07720.47
5.6.200.0100.07718.19
5.6.190.0070.08320.77
5.6.180.0500.07720.60
5.6.170.0200.04020.52
5.6.160.0130.07720.39
5.6.150.0130.07718.15
5.6.140.0100.03318.28
5.6.130.0070.08018.26
5.6.120.0200.05720.94
5.6.110.0070.08321.14
5.6.100.0070.04020.93
5.6.90.0070.07720.88
5.6.80.0070.03720.43
5.5.350.0130.07320.33
5.5.340.0070.04017.99
5.5.330.0000.09020.31
5.5.320.0000.04020.32
5.5.310.0270.06320.41
5.5.300.0000.04718.03
5.5.290.0070.07017.98
5.5.280.0000.04320.79
5.5.270.0070.05320.75
5.5.260.0100.08320.79
5.5.250.0070.03720.79
5.5.240.0170.07320.11
5.4.450.0400.05319.55
5.4.440.0500.06319.41
5.4.430.0470.06319.41
5.4.420.0470.06719.30
5.4.410.0400.06019.45
5.4.400.0330.07019.22
5.4.390.0400.06719.21
5.4.380.0430.06719.20
5.4.370.0400.03019.34
5.4.360.0230.04719.19
5.4.350.0530.05319.09
5.4.340.0370.04719.23
5.4.320.0470.07019.16
5.4.310.0400.04318.99
5.4.300.0330.04319.09
5.4.290.0370.03719.14
5.4.280.0370.05019.24
5.4.270.0530.05719.24
5.4.260.0370.04319.22
5.4.250.0500.05319.12
5.4.240.0430.03318.86
5.4.230.0530.05018.94
5.4.220.0370.04319.23
5.4.210.0470.06318.94
5.4.200.0470.07318.84
5.4.190.0470.03318.86
5.4.180.0470.06019.14
5.4.170.0470.02319.14
5.4.160.0400.06319.13
5.4.150.0330.04018.85
5.4.140.0300.04016.46
5.4.130.0470.05316.37
5.4.120.0300.03716.37
5.4.110.0370.05716.63
5.4.100.0230.04316.41
5.4.90.0570.05016.61
5.4.80.0370.06316.49
5.4.70.0530.06016.59
5.4.60.0400.04716.57
5.4.50.0370.03316.48
5.4.40.0470.04016.52
5.4.30.0430.03016.53
5.4.20.0400.04716.48
5.4.10.0570.04716.52
5.4.00.0570.04315.80
5.3.290.0570.06014.71
5.3.280.0400.03714.54
5.3.270.0370.04714.70
5.3.260.0330.04714.55
5.3.250.0300.03714.55
5.3.240.0430.04714.59
5.3.230.0430.05314.46
5.3.220.0470.06014.66
5.3.210.0400.05714.43
5.3.200.0400.05714.42
5.3.190.0400.03314.54
5.3.180.0370.04014.40
5.3.170.0400.04014.40
5.3.160.0470.06314.44
5.3.150.0330.06314.52
5.3.140.0370.04014.42
5.3.130.0330.05014.39
5.3.120.0400.05714.59
5.3.110.0370.04014.42
5.3.100.0400.03313.99
5.3.90.0370.03314.05
5.3.80.0370.03314.06
5.3.70.0300.04013.86
5.3.60.0400.03013.85
5.3.50.0400.04013.92
5.3.40.0500.05013.80
5.3.30.0430.04013.70
5.3.20.0300.04013.56
5.3.10.0430.06313.60
5.3.00.0400.03713.43
5.2.170.0430.05311.09
5.2.160.0270.03311.08
5.2.150.0400.03311.00
5.2.140.0270.03311.00
5.2.130.0430.02711.25
5.2.120.0370.05310.93
5.2.110.0300.04011.19
5.2.100.0400.03010.99
5.2.90.0270.03311.04
5.2.80.0400.04711.03
5.2.70.0330.02711.19
5.2.60.0270.02710.95
5.2.50.0270.03710.95
5.2.40.0270.02310.82
5.2.30.0230.02710.98
5.2.20.0200.03011.11
5.2.10.0200.03010.83
5.2.00.0230.02310.61
5.1.60.0270.0179.97
5.1.50.0200.02310.04
5.1.40.0170.0279.87
5.1.30.0130.03010.27
5.1.20.0200.02710.35
5.1.10.0170.03010.04
5.1.00.0230.02010.05
5.0.50.0100.0238.52
5.0.40.0100.0208.30
5.0.30.0100.0308.09
5.0.20.0100.0208.24
5.0.10.0130.0208.14
5.0.00.0070.0338.14
4.4.90.0030.0207.75
4.4.80.0100.0137.75
4.4.70.0100.0177.75
4.4.60.0130.0107.75
4.4.50.0070.0177.75
4.4.40.0170.0177.76
4.4.30.0100.0137.76
4.4.20.0100.0137.79
4.4.10.0070.0177.79
4.4.00.0130.0237.79
4.3.110.0130.0107.79
4.3.100.0130.0137.79
4.3.90.0130.0137.79
4.3.80.0070.0277.79
4.3.70.0070.0177.79
4.3.60.0100.0137.79
4.3.50.0100.0177.79
4.3.40.0100.0237.79
4.3.30.0030.0177.79
4.3.20.0100.0107.79
4.3.10.0130.0137.79
4.3.00.0030.0177.79

preferences:
44.9 ms | 401 KiB | 5 Q