3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $bar = array('x' => array('a' => 'x1', 'b' => 'x2'), 'y' => array('a' => 'y1', 'b' => 'y2')); public funtion test() { foreach ($bar as $b) { $b['a'] = 'hello'; } } } $foo = new Foo(); $foo->test(); var_dump($foo->bar);

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.310.0070.04319.09
5.4.300.0000.06318.87
5.4.290.0000.07018.99
5.4.280.0030.06719.16
5.4.270.0030.05718.85
5.4.260.0030.08019.09
5.4.250.0070.07318.94
5.4.240.0000.08018.98
5.4.230.0030.07719.21
5.4.220.0030.04719.23
5.4.210.0000.04319.21
5.4.200.0000.07718.84
5.4.190.0070.07718.86
5.4.180.0030.07719.21
5.4.170.0070.07018.84
5.4.160.0000.04019.22
5.4.150.0130.06719.04
5.4.140.0100.04716.49
5.4.130.0070.05316.33
5.4.120.0030.04316.41
5.4.110.0030.04316.58
5.4.100.0000.07316.52
5.4.90.0030.06716.56
5.4.80.0000.04716.35
5.4.70.0070.06316.18
5.4.60.0030.07316.52
5.4.50.0000.05716.51
5.4.40.0030.06016.55
5.4.30.0030.07316.37
5.4.20.0070.06316.24
5.4.10.0070.07316.55
5.4.00.0030.04315.96
5.3.280.0000.07014.51
5.3.270.0000.07714.68
5.3.260.0030.05314.62
5.3.250.0000.04714.48
5.3.240.0070.06714.59
5.3.230.0170.06014.50
5.3.220.0070.07014.55
5.3.210.0030.04314.56
5.3.200.0100.07014.61
5.3.190.0070.07014.51
5.3.180.0030.07014.46
5.3.170.0070.07314.46
5.3.160.0000.05014.46
5.3.150.0030.07314.47
5.3.140.0000.06014.63
5.3.130.0030.07714.55
5.3.120.0030.07314.72
5.3.110.0070.06314.51
5.3.100.0000.06014.01
5.3.90.0030.04713.99
5.3.80.0000.04714.09
5.3.70.0030.04013.96
5.3.60.0000.07714.11
5.3.50.0070.05713.87
5.3.40.0000.07013.95
5.3.30.0000.06013.99
5.3.20.0030.06313.61
5.3.10.0070.07013.73
5.3.00.0070.06313.68
5.2.170.0030.05312.34
5.2.160.0000.05012.34
5.2.150.0000.05712.34
5.2.140.0000.06712.34
5.2.130.0070.03712.34
5.2.120.0030.06012.34
5.2.110.0000.05312.34
5.2.100.0070.04312.34
5.2.90.0030.03712.34
5.2.80.0030.03012.34
5.2.70.0000.03012.34
5.2.60.0000.03012.34
5.2.50.0030.02712.34
5.2.40.0030.02712.34
5.2.30.0000.03012.34
5.2.20.0000.03712.34
5.2.10.0000.02712.34
5.2.00.0000.02712.34
5.1.60.0000.02312.34
5.1.50.0000.02312.34
5.1.40.0030.02012.34
5.1.30.0000.02712.34
5.1.20.0000.02712.34
5.1.10.0030.02712.34
5.1.00.0030.02312.34
5.0.50.0000.02012.34
5.0.40.0000.02012.34
5.0.30.0030.02712.34
5.0.20.0030.01712.34
5.0.10.0030.02012.34
5.0.00.0000.03012.34
4.4.90.0030.01312.34
4.4.80.0000.01312.34
4.4.70.0000.01712.34
4.4.60.0000.01312.34
4.4.50.0000.02012.34
4.4.40.0000.02312.34
4.4.30.0030.01312.34
4.4.20.0000.01312.34
4.4.10.0030.01312.34
4.4.00.0000.02312.34
4.3.110.0000.01312.34
4.3.100.0000.01312.34
4.3.90.0000.01712.34
4.3.80.0000.02312.34
4.3.70.0000.01712.34
4.3.60.0000.01712.34
4.3.50.0000.01312.34
4.3.40.0000.02312.34
4.3.30.0000.01712.34
4.3.20.0000.01712.34
4.3.10.0000.01712.34
4.3.00.0000.01712.34

preferences:
136.61 ms | 1394 KiB | 7 Q