3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Foo\Bar { class Baz { function now() { return time(); } } } namespace { class Test { public static $now; function register() { $namespace = 'Foo\\Bar'; eval('namespace '.$namespace.' { function time() { return \\'.__CLASS__.'::$now ?: \time(); } }'); } } $b = new Foo\Bar\Baz(); $t = new Test(); $t->register(); Test::$now = 'xxx'; echo $b->now(); }

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.0.110.0050.00316.85
8.0.100.0070.00016.77
8.0.90.0040.00416.89
8.0.80.0100.01016.88
8.0.70.0040.00416.90
8.0.60.0000.00816.91
8.0.50.0040.00416.96
8.0.30.0150.00517.14
8.0.20.0110.00917.40
8.0.10.0040.00417.00
8.0.00.0080.01316.93
7.4.240.0020.00516.58
7.4.230.0000.00716.68
7.4.220.0090.00916.64
7.4.210.0070.00816.56
7.4.200.0000.00716.34
7.4.190.0080.00016.50
7.4.160.0040.01316.53
7.4.150.0130.00317.40
7.4.140.0080.00917.86
7.4.130.0030.01316.37
7.4.120.0130.00516.51
7.4.110.0130.00616.44
7.4.100.0120.01116.51
7.4.90.0060.00916.46
7.4.80.0100.00719.39
7.4.70.0160.00016.49
7.4.60.0060.01216.51
7.4.50.0030.00516.41
7.4.40.0070.00522.77
7.4.30.0090.00616.64
7.4.00.0100.00714.96
7.3.300.0000.00716.26
7.3.290.0090.00616.33
7.3.280.0060.01416.32
7.3.270.0070.01017.40
7.3.260.0110.01016.48
7.3.250.0130.00916.36
7.3.240.0160.00616.45
7.3.230.0120.00616.45
7.3.210.0070.01116.54
7.3.200.0000.01519.39
7.3.190.0100.01016.45
7.3.180.0090.00916.34
7.3.170.0140.00316.39
7.3.160.0120.00916.55
7.3.120.0070.00714.99
7.2.330.0110.00616.86
7.2.320.0060.02616.85
7.2.310.0150.00616.80
7.2.300.0090.00616.65
7.2.290.0130.00316.80
7.2.00.0030.01019.57
7.1.100.0000.01117.86
7.1.70.0070.00317.06
7.1.60.0130.01019.33
7.1.50.0120.01216.57
7.1.00.0070.07322.45
7.0.200.0100.00316.79
7.0.140.0100.06722.20
7.0.100.0370.09719.96
7.0.90.0130.08719.99
7.0.80.0330.04319.89
7.0.70.0170.07019.99
7.0.60.0230.08019.95
7.0.50.0370.07720.36
7.0.40.0030.08020.09
7.0.30.0070.04720.00
7.0.20.0100.08720.13
7.0.10.0100.07720.08
7.0.00.0130.08320.13
5.6.280.0030.07321.07
5.6.250.0000.07320.63
5.6.240.0130.06020.69
5.6.230.0100.06720.60
5.6.220.0100.07720.48
5.6.210.0070.05020.76
5.6.200.0100.07021.03
5.6.190.0130.08021.00
5.6.180.0100.08321.03
5.6.170.0200.07721.09
5.6.160.0130.08320.96
5.6.150.0070.08021.07
5.6.140.0170.07021.01
5.6.130.0100.08320.94
5.6.120.0070.07721.01
5.6.110.0030.07321.13
5.6.100.0030.09021.16
5.6.90.0070.08020.98
5.6.80.0030.07320.38
5.6.70.0070.07320.44
5.6.60.0070.07720.33
5.6.50.0100.06720.44
5.6.40.0030.08020.31
5.6.30.0030.04720.48
5.6.20.0030.04720.31
5.6.10.0070.03720.42
5.6.00.0070.04020.30
5.5.380.0100.07020.38
5.5.370.0130.08720.57
5.5.360.0030.04320.42
5.5.350.0100.07020.38
5.5.340.0070.08020.79
5.5.330.0070.08720.75
5.5.320.0130.05020.91
5.5.310.0070.06320.90
5.5.300.0100.08020.88
5.5.290.0070.06320.62
5.5.280.0030.08020.89
5.5.270.0170.08020.89
5.5.260.0130.07320.80
5.5.250.0170.07020.71
5.5.240.0070.08020.28
5.5.230.0170.06320.14
5.5.220.0070.08020.31
5.5.210.0100.08020.19
5.5.200.0070.08020.28
5.5.190.0130.06320.00
5.5.180.0000.04320.19
5.5.160.0130.03020.12
5.5.150.0070.04320.28
5.5.140.0000.04720.15
5.5.130.0030.04020.24
5.5.120.0070.04320.27
5.5.110.0130.06720.25
5.5.100.0170.03020.19
5.5.90.0000.08720.12
5.5.80.0100.07020.07
5.5.70.0030.04720.14
5.5.60.0100.07720.06
5.5.50.0100.07320.16
5.5.40.0130.05719.94
5.5.30.0030.07319.96
5.5.20.0170.06719.95
5.5.10.0100.07719.96
5.5.00.0000.08020.04
5.4.450.0070.07319.45
5.4.440.0100.08019.54
5.4.430.0000.08719.41
5.4.420.0100.06319.41
5.4.410.0100.07319.29
5.4.400.0070.07019.09
5.4.390.0070.07318.85
5.4.380.0130.05318.85
5.4.370.0130.06319.14
5.4.360.0030.07319.13
5.4.350.0100.07019.12
5.4.340.0070.03719.16
5.4.320.0000.04319.03
5.4.310.0070.05019.20
5.4.300.0100.03019.09
5.4.290.0070.07719.16
5.4.280.0000.06019.15
5.4.270.0130.03319.18
5.4.260.0030.05018.85
5.4.250.0130.05718.90
5.4.240.0070.07319.20
5.4.230.0000.05019.04
5.4.220.0070.08318.94
5.4.210.0070.07719.05
5.4.200.0030.07318.85
5.4.190.0100.06719.12
5.4.180.0070.08018.84
5.4.170.0130.06319.11
5.4.160.0030.09018.85
5.4.150.0200.05719.13
5.4.140.0130.07016.39
5.4.130.0100.07016.46
5.4.120.0200.05316.33
5.4.110.0130.05316.39
5.4.100.0000.05316.39
5.4.90.0100.06716.44
5.4.80.0100.06016.51
5.4.70.0070.04316.50
5.4.60.0130.06316.37
5.4.50.0070.07316.48
5.4.40.0070.07316.55
5.4.30.0070.07316.46
5.4.20.0070.04716.40
5.4.10.0000.06316.33
5.4.00.0030.04015.64
5.3.290.0070.04015.63
5.3.280.0100.07715.63
5.3.270.0100.07315.63
5.3.260.0170.07015.63
5.3.250.0070.08015.63
5.3.240.0170.06715.63
5.3.230.0170.05715.63
5.3.220.0070.08315.63
5.3.210.0100.07015.63
5.3.200.0100.07315.63
5.3.190.0100.07315.63
5.3.180.0130.03315.63
5.3.170.0030.04015.63
5.3.160.0130.06015.63
5.3.150.0100.07315.63
5.3.140.0030.05715.63
5.3.130.0070.07315.63
5.3.120.0030.08315.63
5.3.110.0070.07315.63
5.3.100.0100.07015.63
5.3.90.0030.08715.63
5.3.80.0070.04315.63
5.3.70.0000.08015.63
5.3.60.0070.03715.63
5.3.50.0100.07315.63
5.3.40.0000.04315.63
5.3.30.0070.04315.63
5.3.20.0070.07015.63
5.3.10.0030.03715.63
5.3.00.0030.04015.63
5.2.170.0030.04715.63
5.2.160.0070.05315.63
5.2.150.0100.04315.63
5.2.140.0100.06015.63
5.2.130.0000.06315.63
5.2.120.0100.05015.63
5.2.110.0030.03715.63
5.2.100.0000.05715.63
5.2.90.0000.04015.63
5.2.80.0070.06015.63
5.2.70.0100.05015.63
5.2.60.0030.04015.63
5.2.50.0070.05315.63
5.2.40.0070.06315.63
5.2.30.0100.06015.63
5.2.20.0070.06315.63
5.2.10.0070.05015.63
5.2.00.0070.05315.63
5.1.60.0030.04715.63
5.1.50.0070.05315.63
5.1.40.0070.05015.63
5.1.30.0070.05315.63
5.1.20.0130.05015.63
5.1.10.0000.03315.63
5.1.00.0030.04715.63
5.0.50.0000.04715.63
5.0.40.0100.01715.63
5.0.30.0070.04315.63
5.0.20.0030.02015.63
5.0.10.0000.02315.63
5.0.00.0030.03015.63
4.4.90.0000.03715.63
4.4.80.0070.02715.63
4.4.70.0000.03715.63
4.4.60.0000.03015.63
4.4.50.0000.03015.63
4.4.40.0000.05715.63
4.4.30.0070.03015.63
4.4.20.0030.02715.63
4.4.10.0030.02315.63
4.4.00.0000.02715.63
4.3.110.0070.02715.63
4.3.100.0000.01715.63
4.3.90.0000.02015.63
4.3.80.0030.02315.63
4.3.70.0000.01715.63
4.3.60.0000.01715.63
4.3.50.0030.01315.63
4.3.40.0030.02015.63
4.3.30.0000.01715.63
4.3.20.0000.01715.63
4.3.10.0000.01715.63
4.3.00.0030.01315.63

preferences:
44.32 ms | 401 KiB | 5 Q