3v4l.org

run code in 300+ PHP versions simultaneously
<?php ini_set('memory_limit', '64K'); class Foo { function __construct() { $this->bar = new Bar($this); } } class Bar { function __construct($foo = null) { $this->foo = $foo; } } while (true) { $foo = new Foo(); unset($foo); echo number_format(memory_get_usage()) . "\n"; }

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.00.0110.00319.55
7.1.70.0070.00317.28
7.1.60.0100.02019.17
7.1.50.0040.01117.04
7.1.00.0000.07022.45
7.0.200.0030.00616.89
7.0.140.0100.07322.23
7.0.70.0130.04021.75
7.0.60.0070.04021.80
7.0.50.0030.03722.16
7.0.40.0030.03720.13
7.0.30.0070.09020.13
7.0.20.0070.06320.18
7.0.10.0030.08020.03
7.0.00.0000.09020.26
5.6.280.0000.07321.08
5.6.220.0070.05320.63
5.6.210.0030.04020.62
5.6.200.0030.03720.97
5.6.190.0030.03321.11
5.6.180.0130.03321.11
5.6.170.0100.07021.09
5.6.160.0100.07721.09
5.6.150.0030.07321.04
5.6.140.0000.08321.11
5.6.130.0000.08720.94
5.6.120.0030.08320.93
5.6.110.0100.08321.16
5.6.100.0170.07321.16
5.6.90.0070.08021.00
5.6.80.0100.07720.46
5.6.70.0070.08020.32
5.6.60.0070.07720.46
5.6.50.0100.07320.42
5.6.40.0130.07020.38
5.6.30.0130.07320.41
5.6.20.0070.08020.49
5.6.10.0100.07020.42
5.6.00.0030.06720.28
5.5.360.0000.04720.36
5.5.350.0130.02320.29
5.5.340.0100.02720.93
5.5.330.0130.02720.63
5.5.320.0300.06720.85
5.5.310.0070.07320.81
5.5.300.0030.04720.79
5.5.290.0000.07020.80
5.5.280.0070.05320.78
5.5.270.0100.08320.83
5.5.260.0030.08720.82
5.5.250.0170.07720.55
5.5.240.0030.07720.27
5.5.230.0030.05720.18
5.5.220.0030.05020.11
5.5.210.0100.07020.23
5.5.200.0070.05320.09
5.5.190.0170.06720.25
5.5.180.0100.05720.19
5.5.160.0070.07020.13
5.5.150.0000.08320.28
5.5.140.0100.05320.00
5.5.130.0000.04720.08
5.5.120.0070.04320.21
5.5.110.0030.08020.17
5.5.100.0100.08020.13
5.5.90.0070.06720.09
5.5.80.0100.06320.10
5.5.70.0070.07320.06
5.5.60.0000.07720.06
5.5.50.0200.05320.20
5.5.40.0100.07720.09
5.5.30.0030.07320.08
5.5.20.0070.08020.15
5.5.10.0100.06020.12
5.5.00.0070.04720.03
5.4.450.0030.05019.23
5.4.440.0030.08319.36
5.4.430.0000.06019.54
5.4.420.0000.08019.40
5.4.410.0070.05719.20
5.4.400.0000.07719.21
5.4.390.0170.07719.11
5.4.380.0000.08319.23
5.4.370.0030.06719.29
5.4.360.0070.07319.00
5.4.350.0030.07019.04
5.4.340.0070.07019.06
5.4.320.0000.08718.96
5.4.310.0070.04719.20
5.4.300.0100.07319.11
5.4.290.2570.04719.18
5.4.280.0000.07719.00
5.4.270.0030.05319.11
5.4.260.0100.07019.26
5.4.250.0030.05318.96
5.4.240.0000.05019.21
5.4.230.0070.06319.10
5.4.220.0000.08019.10
5.4.210.0170.06019.22
5.4.200.0130.05719.23
5.4.190.0030.07319.10
5.4.180.0030.07719.10
5.4.170.0070.05719.28
5.4.160.0100.05018.94
5.4.150.0000.06319.08
5.4.140.0070.06016.58
5.4.130.0100.04716.58
5.4.120.0030.04316.58
5.4.110.0000.07716.58
5.4.100.0000.04716.58
5.4.90.0100.07316.58
5.4.80.0370.06016.58
5.4.70.0000.05016.58
5.4.60.0030.06716.58
5.4.50.0230.06316.58
5.4.40.0030.06716.58
5.4.30.0070.06716.58
5.4.20.0200.07016.58
5.4.10.0000.07016.58
5.4.00.0130.05316.58
5.3.290.0100.06716.58
5.3.280.0030.06716.58
5.3.270.0030.07016.58
5.3.260.0030.07316.58
5.3.250.0070.06316.58
5.3.240.0130.06316.58
5.3.230.0000.06316.58
5.3.220.0100.03316.58
5.3.210.0070.06316.58
5.3.200.0100.06316.58
5.3.190.0030.07716.58
5.3.180.0030.07316.58
5.3.170.0030.04016.58
5.3.160.0100.06716.58
5.3.150.0100.06716.58
5.3.140.0000.07316.58
5.3.130.0070.07016.58
5.3.120.0000.06316.58
5.3.110.0070.07316.58
5.3.100.0000.05016.58
5.3.90.0070.07316.58
5.3.80.0130.06716.58
5.3.70.0130.06316.58
5.3.60.0030.06716.58
5.3.50.0100.06716.58
5.3.40.0070.07016.58
5.3.30.0130.07316.58
5.3.20.0070.07016.58
5.3.10.0030.07316.58
5.3.00.0200.05716.58

preferences:
34.97 ms | 401 KiB | 5 Q