3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (class_exists('DateTimeImmutable')) { $d = new DateTimeImmutable('2012-02-01 00:00:00.123456'); $d = $d->setTimeZone(new DateTimeZone('UTC')); echo $d->format('u'); } if (class_exists('DateTimeZone')) { $d = new DateTime('2012-02-01 00:00:00.123456'); $d->setTimeZone(new DateTimeZone('UTC')); echo $d->format('u'); }

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.0170.00316.75
8.3.50.0090.00922.12
8.3.40.0120.00319.09
8.3.30.0030.01019.36
8.3.20.0040.00420.55
8.3.10.0050.00322.07
8.3.00.0040.00419.26
8.2.180.0150.01118.38
8.2.170.0150.00022.96
8.2.160.0060.00922.29
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0030.00619.88
8.2.110.0070.00322.41
8.2.100.0110.00019.24
8.2.90.0080.00017.88
8.2.80.0090.00017.97
8.2.70.0030.00518.18
8.2.60.0050.00318.16
8.2.50.0040.00418.10
8.2.40.0000.00920.76
8.2.30.0040.00419.52
8.2.20.0040.00418.12
8.2.10.0070.00018.28
8.2.00.0030.00518.06
8.1.280.0120.00325.92
8.1.270.0030.00719.00
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0060.00322.32
8.1.230.0080.00319.29
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0040.00417.60
8.1.190.0030.00617.47
8.1.180.0000.00918.10
8.1.170.0030.00518.95
8.1.160.0050.00221.99
8.1.150.0000.00718.99
8.1.140.0030.00519.40
8.1.130.0030.00518.09
8.1.120.0040.00417.79
8.1.110.0070.00017.74
8.1.100.0000.00717.75
8.1.90.0000.00717.79
8.1.80.0030.00617.74
8.1.70.0000.00717.73
8.1.60.0060.00317.88
8.1.50.0040.00417.74
8.1.40.0000.00917.77
8.1.30.0000.00917.77
8.1.20.0040.00417.88
8.1.10.0050.00317.86
8.1.00.0030.00617.89
8.0.300.0060.00320.03
8.0.290.0050.00317.13
8.0.280.0030.00318.58
8.0.270.0040.00417.08
8.0.260.0070.00017.54
8.0.250.0070.00017.38
8.0.240.0060.00017.27
8.0.230.0000.00717.13
8.0.220.0030.00317.18
8.0.210.0040.00417.08
8.0.200.0000.00617.11
8.0.190.0070.00317.20
8.0.180.0000.00817.23
8.0.170.0040.00417.24
8.0.160.0080.00017.21
8.0.150.0000.00717.22
8.0.140.0000.00717.04
8.0.130.0000.00513.63
8.0.120.0080.00017.17
8.0.110.0040.00417.21
8.0.100.0040.00417.34
8.0.90.0040.00417.13
8.0.80.0110.01117.13
8.0.70.0000.00817.05
8.0.60.0070.00017.12
8.0.50.0070.00017.14
8.0.30.0130.00717.38
8.0.20.0110.00917.49
8.0.10.0040.00417.43
8.0.00.0080.00917.02
7.4.330.0030.00315.33
7.4.320.0060.00016.66
7.4.300.0060.00016.70
7.4.290.0030.00316.76
7.4.280.0040.00416.70
7.4.270.0000.00716.64
7.4.260.0000.00816.79
7.4.250.0040.00416.79
7.4.240.0030.00316.84
7.4.230.0030.00316.73
7.4.220.0160.00316.68
7.4.210.0070.00916.76
7.4.200.0070.00016.90
7.4.160.0080.00816.53
7.4.150.0060.01217.40
7.4.140.0130.00517.86
7.4.130.0090.00816.79
7.4.120.0150.00216.84
7.4.110.0110.01116.51
7.4.100.0070.01016.87
7.4.90.0090.00916.95
7.4.80.0080.01219.39
7.4.70.0140.00316.65
7.4.60.0080.00816.56
7.4.50.0020.00216.89
7.4.40.0100.01316.61
7.4.30.0090.01216.78
7.4.00.0100.00715.05
7.3.330.0060.00013.39
7.3.320.0000.00713.23
7.3.310.0070.00016.55
7.3.300.0060.00016.58
7.3.290.0060.00016.41
7.3.280.0060.01116.45
7.3.270.0110.00717.40
7.3.260.0080.01516.59
7.3.250.0080.01016.64
7.3.240.0090.00916.55
7.3.230.0140.00316.47
7.3.210.0140.00416.56
7.3.200.0130.01019.39
7.3.190.0120.00616.63
7.3.180.0070.01016.63
7.3.170.0070.01016.56
7.3.160.0030.01316.50
7.3.10.0150.00316.79
7.3.00.0090.00616.90
7.2.330.0000.01716.88
7.2.320.0140.00316.92
7.2.310.0100.00716.75
7.2.300.0030.01416.94
7.2.290.0130.01016.94
7.2.130.0070.00816.95
7.2.120.0110.00316.86
7.2.110.0090.00916.85
7.2.100.0060.00816.81
7.2.90.0100.00817.28
7.2.80.0090.00717.01
7.2.70.0030.01317.07
7.2.60.0120.00217.12
7.2.50.0050.01217.09
7.2.40.0050.01016.83
7.2.30.0050.01117.11
7.2.20.0060.00917.08
7.2.10.0070.00817.09
7.2.00.0040.01117.87
7.1.250.0060.00615.66
7.1.100.0030.01018.10
7.1.70.0030.00517.02
7.1.60.0040.01919.46
7.1.50.0070.01717.02
7.1.00.0100.07022.40
7.0.200.0180.00716.59
7.0.140.0000.07722.09
7.0.60.0030.08721.83
7.0.50.0000.04717.79
7.0.40.0100.05020.09
7.0.30.0130.05020.13
7.0.20.0270.05720.16
7.0.10.0130.07020.09
7.0.00.0100.06320.19
5.6.280.0030.07320.78
5.6.210.0170.06020.50
5.6.200.0030.04718.15
5.6.190.0130.07720.41
5.6.180.0500.04720.77
5.6.170.0230.04020.50
5.6.160.0170.06020.51
5.6.150.0030.04718.20
5.6.140.0070.03718.11
5.6.130.0130.07718.15
5.6.120.0070.04720.99
5.6.110.0100.08320.98
5.6.100.0070.08321.03
5.6.90.0070.04321.10
5.6.80.0070.08320.43
5.5.350.4200.03720.39
5.5.340.0070.05017.88
5.5.330.0130.08020.40
5.5.320.0270.06020.17
5.5.310.0400.04720.41
5.5.300.0070.03718.02
5.5.290.0030.05317.98
5.5.280.0000.06320.93
5.5.270.0100.05020.74
5.5.260.0000.08020.80
5.5.250.0030.08320.68
5.5.240.0270.03720.25
5.4.450.0500.06019.49
5.4.440.0100.05719.52
5.4.430.0100.05319.41
5.4.420.0700.05319.52
5.4.410.0700.05719.34
5.4.400.0730.05018.80
5.4.390.0230.05718.65
5.4.380.0300.07018.76
5.4.370.0230.05718.48
5.4.360.0100.06718.73
5.4.350.0270.06018.68
5.4.340.0230.05318.48
5.4.320.0200.06318.69
5.4.310.0300.05018.45
5.4.300.0270.05318.50
5.4.290.0270.05318.62
5.4.280.0330.05318.45
5.4.270.0330.04718.69
5.4.260.0170.06718.59
5.4.250.0270.06018.60
5.4.240.0300.05018.73
5.4.230.0270.06718.52
5.4.220.0270.05718.44
5.4.210.0270.05318.75
5.4.200.0200.05316.51
5.4.190.0200.05718.47
5.4.180.0330.04718.58
5.4.170.0230.06018.59
5.4.160.0270.05018.60
5.4.150.0300.05318.64
5.4.140.0130.06716.14
5.4.130.0300.04316.16
5.4.120.0270.05016.23
5.4.110.0230.05016.18
5.4.100.0230.05316.29
5.4.90.0270.04716.38
5.4.80.0330.05316.22
5.4.70.0230.05716.36
5.4.60.0070.06716.20
5.4.50.0200.04716.29
5.4.40.0230.05316.07
5.4.30.0370.03716.14
5.4.20.0330.04316.04
5.4.10.0270.05316.07
5.4.00.0330.04015.72
5.3.290.0170.06014.60
5.3.280.0230.05714.64
5.3.270.0200.05714.55
5.3.260.0200.06314.54
5.3.250.0200.05714.71
5.3.240.0200.06014.66
5.3.230.0230.06714.75
5.3.220.0330.06714.73
5.3.210.0170.06314.49
5.3.200.0230.05314.53
5.3.190.0200.05714.57
5.3.180.0300.05014.51
5.3.170.0370.06014.62
5.3.160.0370.06014.72
5.3.150.0270.07314.60
5.3.140.0300.04714.70
5.3.130.0270.07314.47
5.3.120.0300.04714.48
5.3.110.0300.05014.59
5.3.100.0370.04314.16
5.3.90.0300.04713.98
5.3.80.0330.04314.05
5.3.70.0330.06714.02
5.3.60.0230.05314.15
5.3.50.0200.06014.00
5.3.40.0330.06013.88
5.3.30.0200.06014.06
5.3.20.0300.05313.67
5.3.10.0270.04713.80
5.3.00.0230.04713.57
5.2.170.0200.05711.12
5.2.160.0170.05011.22
5.2.150.0270.04311.25
5.2.140.0130.05011.09
5.2.130.0170.04011.24
5.2.120.0230.03711.20
5.2.110.0230.03711.05
5.2.100.0230.03711.04
5.2.90.0100.05311.09
5.2.80.0230.03711.03
5.2.70.0300.03711.09
5.2.60.0130.05311.15
5.2.50.0230.03711.06
5.2.40.0230.03311.05
5.2.30.0230.03711.06
5.2.20.0100.04710.89
5.2.10.0100.04310.81
5.2.00.0170.04310.73
5.1.60.0130.0379.96
5.1.50.0130.03710.00
5.1.40.0170.03710.01
5.1.30.0200.03310.43
5.1.20.0170.04310.40
5.1.10.0200.03310.14
5.1.00.0170.03710.08
5.0.50.0070.0338.61
5.0.40.0070.0338.42
5.0.30.0130.0408.28
5.0.20.0170.0208.21
5.0.10.0130.0278.20
5.0.00.0070.0508.34
4.4.90.0030.0305.90
4.4.80.0130.0235.90
4.4.70.0130.0205.86
4.4.60.0100.0235.80
4.4.50.0100.0305.87
4.4.40.0070.0375.91
4.4.30.0070.0235.89
4.4.20.0100.0235.91
4.4.10.0070.0275.96
4.4.00.0170.0375.91
4.3.110.0100.0205.84
4.3.100.0200.0235.84
4.3.90.0070.0205.83
4.3.80.0030.0505.82
4.3.70.0100.0235.83
4.3.60.0100.0205.82
4.3.50.0070.0335.80
4.3.40.0100.0375.88
4.3.30.0030.0234.54
4.3.20.0070.0204.52
4.3.10.0030.0274.48
4.3.00.0130.0209.15

preferences:
63.92 ms | 401 KiB | 5 Q