3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyObjectStorage extends SplObjectStorage { // Overwrite getHash() with just some (working) test-method public function getHash($object) { return get_class($object); } } class TestObject {} $list = new MyObjectStorage(); // No issues if using "new SplObjectStorage()" $list->attach(new TestObject()); foreach($list as $x) var_dump($list->offsetExists($x)); // TRUE $list2 = clone $list; foreach($list2 as $x) var_dump($list2->offsetExists($x)); // FALSE

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.30.0120.00717.13
8.0.20.0090.01117.40
8.0.00.0100.00916.71
7.4.160.0080.00816.61
7.4.150.0160.00017.40
7.4.140.0120.00817.86
7.4.130.0100.00716.60
7.4.120.0110.00816.53
7.4.110.0100.01316.68
7.4.100.0130.00616.54
7.4.90.0190.00416.56
7.4.80.0110.00719.39
7.4.70.0060.00916.70
7.4.60.0060.01116.41
7.4.50.0030.00316.64
7.4.40.0070.01016.63
7.4.30.0070.01016.43
7.4.00.0070.00714.98
7.3.280.0080.01016.34
7.3.270.0110.01117.40
7.3.260.0090.01216.45
7.3.250.0130.00516.53
7.3.240.0150.00616.64
7.3.230.0130.00316.59
7.3.210.0030.01616.49
7.3.200.0120.00619.39
7.3.190.0130.00916.70
7.3.180.0030.01216.28
7.3.170.0040.01216.58
7.3.160.0100.00716.39
7.3.120.0060.01015.09
7.2.330.0070.01016.73
7.2.320.0090.00916.73
7.2.310.0090.00816.57
7.2.300.0100.00716.63
7.2.290.0060.01216.47
7.2.60.0140.00316.89
7.2.00.0000.01419.46
7.1.200.0040.01115.40
7.1.100.0060.00617.91
7.1.70.0030.00717.13
7.1.60.0140.01019.70
7.1.50.0160.01316.57
7.1.00.0070.07022.54
7.0.200.0040.00416.84
7.0.140.0030.07022.06
7.0.60.0130.07321.71
7.0.50.0070.07322.19
7.0.40.0000.08720.15
7.0.30.0070.06720.18
7.0.20.0030.08720.13
7.0.10.0030.07020.04
7.0.00.0070.05720.03
5.6.280.0070.07020.79
5.6.210.0130.07020.54
5.6.200.0030.07721.16
5.6.190.0000.07320.91
5.6.180.0030.07721.06
5.6.170.0070.06721.01
5.6.160.0070.06321.00
5.6.150.0070.07320.91
5.6.140.0070.06721.15
5.6.130.0030.08321.09
5.6.120.0070.08321.09
5.6.110.0030.08321.02
5.6.100.0000.06721.08
5.6.90.0030.08020.98
5.6.80.0070.07320.38
5.6.70.0070.08020.53
5.6.60.0070.08020.40
5.6.50.0070.07020.46
5.6.40.0030.07720.38
5.6.30.0070.06320.38
5.6.20.0070.07320.38
5.6.10.0070.07720.36
5.6.00.0000.07720.35
5.5.350.0070.08020.54
5.5.340.0030.08320.90
5.5.330.0100.07720.78
5.5.320.0100.06720.89
5.5.310.0030.07720.78
5.5.300.0030.08020.96
5.5.290.0030.07720.78
5.5.280.0030.08320.97
5.5.270.0030.04720.80
5.5.260.0070.07320.80
5.5.250.0070.07320.47
5.5.240.0000.05020.28
5.5.230.0070.07320.37
5.5.220.0070.07320.14
5.5.210.0000.08320.18
5.5.200.0070.07320.24
5.5.190.0100.08020.12
5.5.180.0030.08020.17
5.5.160.0100.06020.16
5.5.150.0170.06020.08
5.5.140.0130.07320.23
5.5.130.0000.08720.13
5.5.120.0070.07720.24
5.5.110.0100.07320.22
5.5.100.0030.08320.24
5.5.90.0030.08020.05
5.5.80.0070.07020.02
5.5.70.0030.07720.18
5.5.60.0000.07720.14
5.5.50.0100.05719.89
5.5.40.0070.07320.21
5.5.30.0070.05320.13
5.5.20.0070.07020.09
5.5.10.0070.07320.07
5.5.00.0030.07720.08
5.4.450.0230.05719.41
5.4.440.0000.08019.25
5.4.430.0030.08019.51
5.4.420.0030.08019.39
5.4.410.0030.07719.39
5.4.400.0000.08019.07
5.4.390.0070.07719.09
5.4.380.0100.05019.12
5.4.370.0100.07319.22
5.4.360.0000.06718.93
5.4.350.0070.06719.17
5.4.340.0000.08719.22
5.4.320.0130.05019.02
5.4.310.0070.06718.90
5.4.300.0070.06719.14
5.4.290.0100.07019.06
5.4.280.0070.07019.04
5.4.270.0030.07319.07
5.4.260.0030.07019.06
5.4.250.0100.07018.90
5.4.240.0030.07719.16
5.4.230.0030.06718.92
5.4.220.0070.07319.06
5.4.210.0030.05318.90
5.4.200.0030.07319.01
5.4.190.0170.06319.11
5.4.180.0030.06319.04
5.4.170.0100.05719.11
5.4.160.0030.07018.99
5.4.150.0030.07719.14
5.4.140.0030.05316.48
5.4.130.0030.07016.30
5.4.120.0130.06316.48
5.4.110.0030.06716.60
5.4.100.0100.05716.30
5.4.90.0070.07016.57
5.4.80.0030.06716.46
5.4.70.0070.07016.46
5.4.60.0070.07016.41
5.4.50.0030.07716.36
5.4.40.0070.07316.40
5.4.30.0030.07316.32
5.4.20.0030.07316.38
5.4.10.0030.06716.37
5.4.00.0030.06715.86
5.3.290.0070.08014.58
5.3.280.0030.03714.46
5.3.270.0130.07014.70
5.3.260.0030.07014.69
5.3.250.0000.06714.68
5.3.240.0000.07714.69
5.3.230.0000.07714.71
5.3.220.0030.07714.53
5.3.210.0000.07314.67
5.3.200.0000.04714.66
5.3.190.0030.07714.68
5.3.180.0100.06314.54
5.3.170.0030.07014.61
5.3.160.0030.07314.53
5.3.150.0030.07014.64
5.3.140.0070.06014.60
5.3.130.0070.07314.41
5.3.120.0070.05314.60
5.3.110.0030.07314.62
5.3.100.0030.06314.08
5.3.90.0000.07713.88
5.3.80.0070.07013.91
5.3.70.0070.05714.00
5.3.60.0030.06714.01
5.3.50.0100.06313.98
5.3.40.0030.07314.00
5.3.30.0030.06713.95
5.3.20.0030.07013.73
5.3.10.0000.07013.71
5.3.00.0000.07313.70
5.2.170.0100.04311.16
5.2.160.0100.05311.24
5.2.150.0000.06311.18
5.2.140.0030.06311.22
5.2.130.0000.05311.15
5.2.120.0030.04711.18
5.2.110.0030.05311.14
5.2.100.0000.06311.16
5.2.90.0100.05311.00
5.2.80.0000.06011.19
5.2.70.0070.05311.13
5.2.60.0070.06010.90
5.2.50.0000.06311.09
5.2.40.0070.05710.86
5.2.30.0000.06711.04
5.2.20.0030.06011.07
5.2.10.0030.06010.92
5.2.00.0000.06310.62
5.1.60.0030.05010.46
5.1.50.0070.05010.46
5.1.40.0030.04710.46
5.1.30.0000.05710.46
5.1.20.0000.05710.46
5.1.10.0030.05310.46
5.1.00.0030.05310.46
5.0.50.0000.04710.46
5.0.40.0000.04710.46
5.0.30.0130.05310.46
5.0.20.0000.04710.46
5.0.10.0000.04310.46
5.0.00.0030.05710.46
4.4.90.0000.03710.46
4.4.80.0000.03310.46
4.4.70.0000.03710.46
4.4.60.0030.03310.46
4.4.50.0000.03710.46
4.4.40.0000.05310.46
4.4.30.0030.03010.46
4.4.20.0030.02310.46
4.4.10.0030.03710.46
4.4.00.0030.05710.46
4.3.110.0030.03310.46
4.3.100.0000.03310.46
4.3.90.0030.03310.46
4.3.80.0030.05310.46
4.3.70.0070.02310.46
4.3.60.0000.03710.46
4.3.50.0000.03010.46
4.3.40.0070.04710.46
4.3.30.0000.03310.46
4.3.20.0030.03010.46
4.3.10.0070.03010.46
4.3.00.0000.03310.46