3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { function __construct() { $this->bar = new Bar($this); } } class Bar { function __construct($foo = null) { $this->foo = $foo; } } $i = 1; while ($i > 1000) { $foo = new Foo(); unset($foo); echo number_format(memory_get_usage()) . "\n"; $i++; }

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.0040.01419.35
7.1.70.0000.00816.73
7.1.60.0100.01419.40
7.1.50.0140.00734.80
7.1.00.0030.07322.28
7.0.200.0030.00714.59
7.0.140.0030.06722.09
7.0.120.0070.06021.96
7.0.60.0000.08721.75
7.0.50.0070.03717.84
7.0.40.0130.07020.28
7.0.30.0200.04720.33
7.0.20.0270.04020.22
7.0.10.0000.08020.19
7.0.00.0030.04720.25
5.6.280.0030.07321.04
5.6.210.0100.07720.54
5.6.200.0130.07018.16
5.6.190.0070.08020.61
5.6.180.0200.08720.50
5.6.170.0300.07720.47
5.6.160.0100.07720.41
5.6.150.0030.05018.16
5.6.140.0030.07718.18
5.6.130.0030.07018.19
5.6.120.0100.06721.16
5.6.110.0100.08020.96
5.6.100.0100.06721.00
5.6.90.0070.07320.89
5.6.80.0030.03720.42
5.5.350.0070.03320.54
5.5.340.0070.04718.05
5.5.330.0070.08720.25
5.5.320.0230.04020.24
5.5.310.0330.05320.24
5.5.300.0070.08017.96
5.5.290.0030.04318.04
5.5.280.0100.08320.84
5.5.270.0030.04320.65
5.5.260.0170.07320.86
5.5.250.0030.09020.70
5.5.240.0200.07720.27
5.4.450.0070.07019.51
5.4.440.0070.08319.57
5.4.430.0070.07719.19
5.4.420.0030.06319.56
5.4.410.0070.07019.44
5.4.400.0030.07719.27
5.4.390.0100.06019.24
5.4.380.0130.07319.14
5.4.370.0100.03319.24
5.4.360.0130.07019.24
5.4.350.0130.08019.09
5.4.340.0100.07718.85
5.4.320.0030.04319.24
5.4.310.0100.04018.85
5.4.300.0000.04318.97
5.4.290.0130.06718.85
5.4.280.0030.08019.08
5.4.270.0070.07019.14
5.4.260.0100.03319.21
5.4.250.0100.04319.15
5.4.240.0100.07318.84
5.4.230.0200.06318.83
5.4.220.0170.03719.24
5.4.210.0100.07019.15
5.4.200.0100.07019.14
5.4.190.0030.05019.23
5.4.180.0070.08018.93
5.4.170.0070.06019.13
5.4.160.0100.05718.83
5.4.150.0000.05318.94
5.4.140.0070.05716.46
5.4.130.0030.08016.44
5.4.120.0200.06316.51
5.4.110.0030.08016.54
5.4.100.0030.07316.48
5.4.90.0070.07316.52
5.4.80.0100.06316.37
5.4.70.0000.06316.45
5.4.60.0070.07316.39
5.4.50.0100.06316.44
5.4.40.0070.05316.38
5.4.30.0130.06716.46
5.4.20.0030.07716.42
5.4.10.0200.03316.50
5.4.00.0100.06715.95
5.3.290.0070.07714.59
5.3.280.0070.07714.67
5.3.270.0100.06714.61
5.3.260.0130.07014.63
5.3.250.0100.07314.77
5.3.240.0030.04014.62
5.3.230.0070.04314.74
5.3.220.0100.04014.63
5.3.210.0100.07714.71
5.3.200.0200.06314.72
5.3.190.0070.07714.58
5.3.180.0030.05314.60
5.3.170.0100.07714.62
5.3.160.0100.07714.60
5.3.150.0130.03714.59
5.3.140.0230.03714.56
5.3.130.0130.05314.57
5.3.120.0030.05314.47
5.3.110.0100.07314.60
5.3.100.0100.07314.09
5.3.90.0070.05014.04
5.3.80.0000.04713.99
5.3.70.0100.07014.02
5.3.60.0030.05014.05
5.3.50.0030.05013.97
5.3.40.0130.07313.95
5.3.30.0170.06314.06
5.3.20.0070.06013.72
5.3.10.0030.07313.67
5.3.00.0100.06313.59
5.2.170.0070.03011.08
5.2.160.0070.06011.10
5.2.150.0070.03311.21
5.2.140.0100.02311.07
5.2.130.0100.04011.11
5.2.120.0030.05711.17
5.2.110.0000.04311.14
5.2.100.0070.06311.15
5.2.90.0170.05011.16
5.2.80.0100.05711.00
5.2.70.0100.04711.06
5.2.60.0000.03711.01
5.2.50.0070.05311.02
5.2.40.0170.04011.00
5.2.30.0100.05711.00
5.2.20.0170.05010.99
5.2.10.0030.04010.91
5.2.00.0000.05010.73
5.1.60.0100.05010.70
5.1.50.0130.04310.70
5.1.40.0030.05010.70
5.1.30.0100.03710.70
5.1.20.0070.04010.70
5.1.10.0030.03710.70
5.1.00.0130.02310.70
5.0.50.0130.03710.70
5.0.40.0030.04310.70
5.0.30.0000.06010.70
5.0.20.0070.04310.70
5.0.10.0030.03710.70
5.0.00.0030.06310.70
4.4.90.0030.02010.70
4.4.80.0030.03310.70
4.4.70.0030.02010.70
4.4.60.0030.02710.70
4.4.50.0000.03010.70
4.4.40.0030.04010.70
4.4.30.0030.02010.70
4.4.20.0030.03010.70
4.4.10.0000.02710.70
4.4.00.0000.04710.70
4.3.110.0000.03010.70
4.3.100.0000.03710.70
4.3.90.0030.03310.70
4.3.80.0030.03710.70
4.3.70.0000.02710.70
4.3.60.0000.02310.70
4.3.50.0030.02010.70
4.3.40.0000.03310.70
4.3.30.0070.03310.70
4.3.20.0000.02710.70
4.3.10.0030.03710.70
4.3.00.0030.03010.70

preferences:
30.77 ms | 401 KiB | 5 Q