3v4l.org

run code in 300+ PHP versions simultaneously
<?php class util { public static function test(): string { return \DateTime::createFromFormat("Y-m-d H:i:s",time())->format("Y-m-d H:i:s"); } } echo util::test();

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)
7.2.60.0150.00016.78
7.2.00.0040.01219.15
7.1.200.0050.00515.66
7.1.100.0070.01117.70
7.1.70.0030.01317.18
7.1.60.0090.01619.43
7.1.50.0040.00717.04
7.1.00.0070.07022.51
7.0.200.0280.00614.90
7.0.90.0100.07719.86
7.0.80.0170.07019.87
7.0.70.0030.05719.96
7.0.60.0030.05019.92
7.0.50.0030.05020.24
7.0.40.0070.08320.09
7.0.30.0070.08020.13
7.0.20.0030.09020.04
7.0.10.0070.07320.07
7.0.00.0100.06720.03
5.6.280.0000.07721.00
5.6.240.0030.08020.70
5.6.230.0030.08320.54
5.6.220.0130.07020.68
5.6.210.0130.06720.46
5.6.200.0100.08021.02
5.6.190.0130.08020.95
5.6.180.0100.04721.07
5.6.170.0030.08321.14
5.6.160.0170.06721.03
5.6.150.0200.03721.11
5.6.140.0070.07321.07
5.6.130.0200.07321.17
5.6.120.0170.06321.11
5.6.110.0100.06020.99
5.6.100.0070.05021.01
5.6.90.0070.08020.94
5.6.80.0070.07020.55
5.6.70.0000.05720.40
5.6.60.0100.06720.51
5.6.50.0000.04320.39
5.6.40.0100.03720.40
5.6.30.0030.04020.34
5.6.20.0030.04020.46
5.6.10.0070.04020.44
5.6.00.0070.03720.23
5.5.380.0070.05020.45
5.5.370.0070.05720.42
5.5.360.0130.07320.46
5.5.350.0130.06720.36
5.5.340.0070.07320.89
5.5.330.0130.07720.91
5.5.320.0100.08020.91
5.5.310.0100.04720.76
5.5.300.0100.07020.92
5.5.290.0170.03720.83
5.5.280.0070.06320.75
5.5.270.0130.08020.82
5.5.260.0000.08020.83
5.5.250.0100.06720.64
5.5.240.0130.03720.12
5.5.230.0070.07020.29
5.5.220.0100.04320.20
5.5.210.0030.04020.02
5.5.200.0000.04320.12
5.5.190.0030.04020.24
5.5.180.0030.04020.13
5.5.160.0070.03320.28
5.5.150.0030.04020.27
5.5.140.0000.04320.22
5.5.130.0070.03719.99
5.5.120.0070.03320.11
5.5.110.0030.03720.10
5.5.100.0030.04320.02
5.5.90.0100.04320.17
5.5.80.0070.04320.05
5.5.70.0070.04020.15
5.5.60.0030.03720.16
5.5.50.0030.03720.16
5.5.40.0070.03320.14
5.5.30.0070.03020.04
5.5.20.0000.04020.04
5.5.10.0070.03719.98
5.5.00.0030.04019.98
5.4.450.0070.08019.45
5.4.440.0030.08319.20
5.4.430.0100.07719.46
5.4.420.0070.03719.36
5.4.410.0070.03319.14
5.4.400.0070.04018.86
5.4.390.0030.04719.05
5.4.380.0130.03718.90
5.4.370.0070.03319.03
5.4.360.0030.03719.18
5.4.350.0070.04018.90
5.4.340.0000.03718.88
5.4.320.0030.03718.85
5.4.310.0070.03318.90
5.4.300.0030.03719.04
5.4.290.0070.03319.12
5.4.280.0030.05719.16
5.4.270.0000.03319.16
5.4.260.0000.04019.09
5.4.250.0070.03719.02
5.4.240.0000.04019.13
5.4.230.0000.03718.86
5.4.220.0000.03719.12
5.4.210.0030.04018.90
5.4.200.0000.04018.84
5.4.190.0030.04018.84
5.4.180.0000.03719.02
5.4.170.0030.03718.88
5.4.160.0030.03719.07
5.4.150.0100.04318.85
5.4.140.0030.03016.46
5.4.130.0000.03716.32
5.4.120.0030.03716.42
5.4.110.0030.03316.47
5.4.100.0030.03316.35
5.4.90.0100.03016.43
5.4.80.0030.03316.48
5.4.70.0000.03716.41
5.4.60.0000.04316.41
5.4.50.0070.03316.31
5.4.40.0000.03716.38
5.4.30.0030.03316.24
5.4.20.0100.03016.37
5.4.10.0030.05716.39
5.4.00.0000.03715.88

preferences:
33.68 ms | 401 KiB | 5 Q