3v4l.org

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

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.0230.08320.30
7.0.10.0100.06320.21
7.0.00.0100.03720.23
5.6.170.0170.04020.57
5.6.160.0130.05020.53
5.6.150.0170.07018.19
5.6.140.0100.08318.15
5.6.130.0100.08318.29
5.6.120.0030.07021.05
5.6.110.0100.07721.01
5.6.100.0070.07321.11
5.6.90.0000.04320.95
5.6.80.0100.08320.38
5.5.310.0270.05020.19
5.5.300.0100.04017.95
5.5.290.0130.04317.98
5.5.280.0100.08720.90
5.5.270.0200.07320.95
5.5.260.0100.08020.79
5.5.250.0070.03720.58
5.5.240.0030.08020.16

preferences:
162.01 ms | 1394 KiB | 7 Q