3v4l.org

run code in 300+ PHP versions simultaneously
<?php function special_array() { $x = 42; return [&$x, &$x]; } foreach (special_array() as $x) { var_dump($x); $x++; } foreach (special_array() as &$x) { var_dump($x); $x++; // This _does_ have an effect. }

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)
8.5.00.0130.00821.66
8.4.150.0020.00014.05
8.4.140.0140.00817.32
8.4.130.0070.00317.77
8.4.120.0080.01020.72
8.4.110.0100.00922.52
8.4.100.0110.00917.70
8.4.90.0110.01020.59
8.4.80.0120.00717.91
8.4.70.0030.00517.63
8.4.60.0110.01020.57
8.4.50.0130.00919.37
8.4.40.0100.01119.07
8.4.30.0060.00319.32
8.3.280.0130.00818.32
8.3.270.0090.01016.60
8.3.260.0140.00616.54
8.3.250.0090.00921.02
8.3.240.0050.00416.70
8.3.230.0100.00816.67
8.3.220.0110.00819.27
8.3.210.0100.00518.66
8.3.200.0060.00516.80
8.3.190.0100.00916.60
8.3.180.0040.00616.68
8.3.170.0070.00918.32
8.3.50.0050.00818.40
8.2.290.0090.01020.70
8.2.280.0120.00716.48
8.1.320.0120.00716.06

preferences:
28.72 ms | 403 KiB | 5 Q