3v4l.org

run code in 300+ PHP versions simultaneously
<?php class B implements ArrayAccess { public function offsetGet($name) { return $name; } public function offsetSet($name, $value) { } public function offsetExists($name) { return true; } public function offsetUnset($name) { } } $aaa = array(1, 2, 3); $bbb = new B(); foreach ($aaa as $a) { $bbb[]; }

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)
5.4.340.0070.03512.02
5.4.320.0070.04012.51
5.4.310.0090.03812.50
5.4.300.0080.03612.52
5.4.290.0070.04012.51
5.4.280.0070.03612.41
5.4.270.0030.03812.41
5.4.260.0050.03712.40
5.4.250.0030.04712.41
5.4.240.0040.04212.41
5.4.230.0060.03612.39
5.4.220.0070.04112.40
5.4.210.0060.03512.40
5.4.200.0040.03812.40
5.4.190.0050.03612.39
5.4.180.0060.03512.39
5.4.170.0070.03512.40
5.4.160.0080.03412.40
5.4.150.0040.03612.39
5.4.140.0070.03512.08
5.4.130.0040.04712.07
5.4.120.0090.03512.03
5.4.110.0050.03612.02
5.4.100.0050.03512.02
5.4.90.0040.03712.02
5.4.80.0050.03812.03
5.4.70.0090.03112.02
5.4.60.0050.03612.02
5.4.50.0030.03912.02
5.4.40.0070.03812.01
5.4.30.0030.03712.00
5.4.20.0070.03312.00
5.4.10.0040.04212.00
5.4.00.0050.03611.50
5.3.290.0060.03912.80
5.3.280.0050.03712.71
5.3.270.0080.03912.73
5.3.260.0080.03512.72
5.3.250.0070.03512.72
5.3.240.0040.03912.72
5.3.230.0060.03712.71
5.3.220.0070.03512.68
5.3.210.0070.03712.68
5.3.200.0060.03612.68
5.3.190.0060.03712.68
5.3.180.0070.03612.67
5.3.170.0060.03512.67
5.3.160.0090.03212.67
5.3.150.0070.03612.68
5.3.140.0050.03712.66
5.3.130.0050.04212.65
5.3.120.0040.04612.65
5.3.110.0060.04112.65
5.3.100.0070.03512.13
5.3.90.0040.04012.11
5.3.80.0080.03312.10
5.3.70.0080.03812.10
5.3.60.0070.03912.09
5.3.50.0050.04012.04
5.3.40.0080.03212.04
5.3.30.0070.03811.99
5.3.20.0050.03611.78
5.3.10.0090.03011.74
5.3.00.0090.03711.72
5.2.170.0030.0319.23
5.2.160.0030.0339.23
5.2.150.0040.0409.23
5.2.140.0040.0399.23
5.2.130.0070.0359.19
5.2.120.0060.0309.19
5.2.110.0050.0289.20
5.2.100.0100.0269.19
5.2.90.0020.0329.18
5.2.80.0100.0259.18
5.2.70.0040.0309.18
5.2.60.0040.0299.14
5.2.50.0040.0299.10
5.2.40.0060.0269.07
5.2.30.0010.0329.06
5.2.20.0020.0309.04
5.2.10.0100.0308.95
5.2.00.0020.0318.82
5.1.60.0040.0248.10
5.1.50.0030.0268.10
5.1.40.0020.0268.08
5.1.30.0050.0258.43
5.1.20.0050.0318.45
5.1.10.0040.0258.17
5.1.00.0030.0258.17
5.0.50.0060.0186.66
5.0.40.0030.0236.51
5.0.30.0030.0316.32
5.0.20.0030.0206.29
5.0.10.0030.0196.26
5.0.00.0050.0296.25
4.4.90.0020.0174.78
4.4.80.0040.0164.76
4.4.70.0040.0154.75
4.4.60.0000.0174.75
4.4.50.0050.0134.77
4.4.40.0020.0264.70
4.4.30.0040.0184.75
4.4.20.0070.0124.84
4.4.10.0070.0174.85
4.4.00.0040.0254.75
4.3.110.0040.0184.67
4.3.100.0030.0154.66
4.3.90.0040.0184.63
4.3.80.0030.0244.58
4.3.70.0040.0144.63
4.3.60.0000.0174.63
4.3.50.0030.0144.63
4.3.40.0010.0294.54
4.3.30.0050.0173.30
4.3.20.0020.0213.28
4.3.10.0010.0163.24
4.3.00.0000.0236.63

preferences:
142.75 ms | 1394 KiB | 7 Q