3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test(){ $x = array( 'first' => '3', 'second' => '4', 'thrid' => '6' ); foreach ($x as $key=>$value){ $value += 4; } return $key=>$value; } $y = test(); echo $y;

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.0.20.0370.07320.06
7.0.10.0100.03720.07
7.0.00.0100.06020.17
5.6.170.0200.03720.54
5.6.160.0100.08020.41
5.6.150.0000.04718.18
5.6.140.0070.07718.17
5.6.130.0030.05318.28
5.6.120.0030.04321.02
5.6.110.0070.08021.09
5.6.100.0100.08020.91
5.6.90.0030.09020.95
5.6.80.0170.07320.51
5.5.310.0230.04720.24
5.5.300.0170.07018.01
5.5.290.0030.06717.98
5.5.280.0130.05320.74
5.5.270.0130.07720.98
5.5.260.0030.05720.88
5.5.250.0130.07320.66
5.5.240.0030.06020.25

preferences:
139.93 ms | 1394 KiB | 7 Q