3v4l.org

run code in 300+ PHP versions simultaneously
<?php class time{ public static $x; public function echoTime() { $this->x = time(); echo $this->x; } } class A { public static function test() { $time = new time(); $time->echoTime(); } } A::test(); sleep(2); A::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.0070.01016.85
7.2.00.0190.01318.85
7.1.200.0090.00615.50
7.1.100.0060.00818.13
7.1.70.0040.00416.98
7.1.60.0150.00919.48
7.1.50.0100.01116.89
7.1.00.0100.06722.33
7.0.200.0760.01014.72
7.0.80.0030.04019.99
7.0.70.0170.07319.80
7.0.60.0200.05319.93
7.0.50.0400.07320.28
7.0.40.0030.05720.13
7.0.30.0030.04320.11
7.0.20.0130.08020.04
7.0.10.0030.06320.12
7.0.00.0030.03720.07
5.6.280.0070.07320.86
5.6.230.0030.07720.60
5.6.220.0070.03720.65
5.6.210.0030.08320.77
5.6.200.0070.06321.04
5.6.190.0100.08320.93
5.6.180.0000.04721.02
5.6.170.0070.07721.11
5.6.160.0000.05021.10
5.6.150.0170.06321.02
5.6.140.0070.03721.00
5.6.130.0070.08721.08
5.6.120.0170.07720.96
5.6.110.0130.08721.11
5.6.100.0200.07721.16
5.6.90.0170.05021.04
5.6.80.0100.08020.51
5.6.70.0100.04020.41
5.6.60.0070.03320.42
5.6.50.0070.07020.47
5.6.40.0130.03720.45
5.6.30.0070.06320.44
5.6.20.0170.07720.43
5.6.10.0070.08720.39
5.6.00.0130.07720.30
5.5.370.0130.07020.50
5.5.360.0070.08020.55
5.5.350.0130.04020.46
5.5.340.0030.08320.78
5.5.330.0130.07020.92
5.5.320.0070.04720.91
5.5.310.0070.08020.79
5.5.300.0030.04020.86
5.5.290.0100.04020.87
5.5.280.0070.08720.83
5.5.270.0170.07320.92
5.5.260.0070.08720.89
5.5.250.0100.06320.74
5.5.240.0070.03720.16
5.5.230.0030.04020.02
5.5.220.0070.06720.31
5.5.210.0100.06320.17
5.5.200.0100.05720.28
5.5.190.0070.05020.27
5.5.180.0030.03720.18
5.5.160.0130.07320.23
5.5.150.0070.06720.25
5.5.140.0000.08720.07
5.5.130.0100.06320.14
5.5.120.0030.09020.24
5.5.110.0070.04320.15
5.5.100.0030.08020.07
5.5.90.0030.08319.98
5.5.80.0170.05720.06
5.5.70.0130.07720.09
5.5.60.0070.07320.06
5.5.50.0200.06019.97
5.5.40.0100.07719.96
5.5.30.0030.04019.96
5.5.20.0030.04020.04
5.5.10.0000.04320.02
5.5.00.0000.08719.97

preferences:
35.28 ms | 401 KiB | 5 Q