3v4l.org

run code in 300+ PHP versions simultaneously
<?php date_default_timezone_set('Europe/Prague'); $tz = new \DateTimeZone('UTC'); $date = new \DateTime('2016-05-05 midnight', $tz); echo $date->format('c'); echo PHP_EOL; $date->modify('first day of this month midnight'); $date->modify('-2 months'); $date->modify('last day of this month'); echo $date->format('c');

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.0120.00616.63
8.3.50.0130.00318.11
8.3.40.0110.00318.84
8.3.30.0060.00918.81
8.3.20.0030.00622.04
8.3.10.0040.00421.81
8.3.00.0040.00419.79
8.2.180.0110.01116.88
8.2.170.0090.00622.96
8.2.160.0110.00419.45
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0000.00822.21
8.2.120.0040.00426.35
8.2.110.0090.00020.47
8.2.100.0090.00317.84
8.2.90.0040.00419.17
8.2.80.0000.00817.97
8.2.70.0060.00317.63
8.2.60.0040.00418.05
8.2.50.0080.00318.10
8.2.40.0000.00820.63
8.2.30.0000.00820.98
8.2.20.0000.00817.89
8.2.10.0030.00618.07
8.2.00.0040.00418.05
8.1.280.0030.01225.92
8.1.270.0090.00023.99
8.1.260.0000.00828.09
8.1.250.0070.00028.09
8.1.240.0050.00522.47
8.1.230.0090.00320.64
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0110.00017.25
8.1.190.0050.00317.35
8.1.180.0000.00818.10
8.1.170.0030.00618.83
8.1.160.0040.00422.21
8.1.150.0000.00720.71
8.1.140.0000.00719.47
8.1.130.0050.00217.68
8.1.120.0000.00717.61
8.1.110.0000.00717.58
8.1.100.0110.00017.64
8.1.90.0040.00417.52
8.1.80.0080.00017.49
8.1.70.0070.00017.62
8.1.60.0080.00017.60
8.1.50.0040.00417.68
8.1.40.0000.01217.42
8.1.30.0040.00417.70
8.1.20.0000.00817.73
8.1.10.0050.00217.61
8.1.00.0000.00717.70
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0030.00318.52
8.0.270.0000.00817.37
8.0.260.0070.00017.25
8.0.250.0030.00317.22
8.0.240.0000.00917.22
8.0.230.0030.00317.10
8.0.220.0040.00417.01
8.0.210.0030.00317.05
8.0.200.0040.00417.12
8.0.190.0040.00417.09
8.0.180.0030.00317.04
8.0.170.0000.00716.97
8.0.160.0000.00816.93
8.0.150.0070.00017.07
8.0.140.0000.00717.02
8.0.130.0030.00313.47
8.0.120.0000.00917.04
8.0.110.0000.00716.91
8.0.100.0000.00716.88
8.0.90.0040.00417.00
8.0.80.0160.00616.99
8.0.70.0040.00417.03
8.0.60.0040.00416.98
8.0.50.0050.00217.02
8.0.30.0110.00617.05
8.0.20.0110.00817.40
8.0.10.0040.00417.03
8.0.00.0090.00817.00
7.4.330.0000.00515.08
7.4.320.0030.00316.66
7.4.300.0000.00616.69
7.4.290.0040.00416.67
7.4.280.0020.00516.67
7.4.270.0030.00316.48
7.4.260.0000.00616.64
7.4.250.0000.00816.59
7.4.240.0030.00316.67
7.4.230.0070.00016.73
7.4.220.0090.00616.74
7.4.210.0100.00916.66
7.4.200.0040.00416.49
7.4.160.0110.00516.45
7.4.150.0090.00917.40
7.4.140.0150.00317.86
7.4.130.0140.00616.50
7.4.120.0150.00516.67
7.4.110.0080.01116.68
7.4.100.0130.00316.64
7.4.90.0070.01016.64
7.4.80.0090.00919.39
7.4.70.0070.01316.45
7.4.60.0100.00716.66
7.4.50.0080.00316.71
7.4.40.0150.00316.57
7.4.30.0130.00316.57
7.4.00.0060.01115.27
7.3.330.0040.00413.08
7.3.320.0000.00613.22
7.3.310.0000.00716.40
7.3.300.0030.00316.38
7.3.290.0070.00016.33
7.3.280.0090.01016.34
7.3.270.0100.00717.40
7.3.260.0130.00516.60
7.3.250.0120.00916.44
7.3.240.0100.00916.35
7.3.230.0070.01016.52
7.3.210.0100.00616.37
7.3.200.0110.00516.58
7.3.190.0140.00316.65
7.3.180.0030.01616.38
7.3.170.0040.01416.49
7.3.160.0210.00316.31
7.3.120.0100.00714.88
7.3.110.0090.00914.95
7.3.100.0030.00714.73
7.3.90.0070.01014.67
7.3.80.0120.00314.99
7.3.70.0060.01214.57
7.3.60.0110.00414.96
7.3.50.0040.00814.57
7.3.40.0000.01614.72
7.3.30.0080.00614.93
7.3.20.0100.00616.59
7.3.10.0120.00316.44
7.3.00.0080.00316.52
7.2.330.0120.00916.64
7.2.320.0080.00816.43
7.2.310.0170.00716.82
7.2.300.0070.01116.81
7.2.290.0130.00316.75
7.2.240.0030.01414.98
7.2.230.0000.01715.01
7.2.220.0070.01115.31
7.2.210.0040.01115.24
7.2.200.0110.00715.16
7.2.190.0060.00915.05
7.2.180.0000.01614.96
7.2.170.0030.01115.23
7.2.160.0120.00315.29
7.2.150.0000.01716.93
7.2.140.0060.00817.06
7.2.130.0060.01016.67
7.2.120.0030.01417.02
7.2.110.0100.00716.78
7.2.100.0100.00717.06
7.2.90.0130.00317.11
7.2.80.0100.00716.86
7.2.70.0070.00716.70
7.2.60.0070.00516.91
7.2.50.0000.01616.96
7.2.40.0060.00616.91
7.2.30.0100.00717.06
7.2.20.0050.00516.77
7.2.10.0090.00616.92
7.2.00.0090.00718.36
7.1.330.0090.00715.76
7.1.320.0090.00615.97
7.1.310.0030.01315.97
7.1.300.0150.00015.97
7.1.290.0080.00415.83
7.1.280.0090.00615.77
7.1.270.0030.01215.91
7.1.260.0060.00815.74
7.1.250.0030.00715.76
7.1.200.0080.00515.70
7.1.100.0030.01218.11
7.1.70.0000.00817.19
7.1.60.0060.00619.75
7.1.00.0030.07722.36
7.0.200.0060.00316.86
7.0.90.0030.06720.03
7.0.80.0170.05319.93
7.0.70.0170.06319.98
7.0.60.0230.04719.98
7.0.50.0270.04720.34
7.0.40.0100.06020.45
7.0.30.0070.06320.33
7.0.20.0130.06020.37
7.0.10.0130.05720.35
7.0.00.0100.06020.44
5.6.240.0100.06020.79
5.6.230.0100.06020.67
5.6.220.0170.05320.63
5.6.210.0170.05020.69
5.6.200.0230.05321.06
5.6.190.0170.05321.04
5.6.180.0170.05321.17
5.6.170.0130.05721.08
5.6.160.0100.05721.10
5.6.150.0130.05321.01
5.6.140.0130.05321.09
5.6.130.0030.06721.07
5.6.120.0100.06021.01
5.6.110.0070.06321.13
5.6.100.0200.04721.00
5.6.90.0130.05721.07
5.6.80.0130.05020.50
5.6.70.0100.05320.39
5.6.60.0030.06320.41
5.6.50.0100.05720.46
5.6.40.0130.05020.34
5.6.30.0070.05720.55
5.6.20.0100.06020.48
5.6.10.0030.06720.47
5.6.00.0130.05720.45

preferences:
61.68 ms | 401 KiB | 5 Q