3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test(&$arr) { static $a; var_dump($a); if (!isset($a)) { $a = &$arr; } } $arr = [1, 2, 3]; test(&$arr); test(&$arr);

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.0200.03720.30
7.0.10.0070.08020.09
7.0.00.0030.06020.20
5.6.170.0200.03720.40
5.6.160.0100.08020.47
5.6.150.0000.09018.34
5.6.140.0070.07718.21
5.6.130.0030.08718.18
5.6.120.0070.04021.07
5.6.110.0030.05720.99
5.6.100.0030.05721.00
5.6.90.0030.07020.97
5.6.80.0100.07720.35
5.5.310.0230.06320.51
5.5.300.0030.05017.95
5.5.290.0130.07718.07
5.5.280.0130.08020.82
5.5.270.0070.03720.87
5.5.260.0000.08720.94
5.5.250.0170.06320.47
5.5.240.0000.08320.37

preferences:
140.09 ms | 1394 KiB | 7 Q