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.0270.04320.19
7.0.10.0100.05020.09
7.0.00.0170.07320.22
5.6.170.0230.04320.47
5.6.160.0070.04020.61
5.6.150.0170.07018.15
5.6.140.0130.07718.18
5.6.130.0070.04018.21
5.6.120.0000.05021.04
5.6.110.0070.08721.13
5.6.100.0070.04020.97
5.6.90.0070.05320.97
5.6.80.0100.07720.44
5.5.310.0370.07020.32
5.5.300.0100.07017.98
5.5.290.0100.08018.09
5.5.280.0170.06720.88
5.5.270.0030.05720.88
5.5.260.0030.08320.89
5.5.250.0100.03320.47
5.5.240.0130.07020.29

preferences:
139.86 ms | 1394 KiB | 7 Q