3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array(); $foo = 'foo'; $st = microtime(true); for ($i = 0; $i < 50000; $i++) { array_splice($a,0,0,array(&$foo)); } $et = microtime(true); echo 'splice: ', $et - $st, "\n"; $a = array(); $foo = 'foo'; $st = microtime(true); for ($i = 0; $i < 50000; $i++) { array_unshift($a,&$foo); } $et = microtime(true); echo 'unshift: ', $et - $st, "\n";
Output for 5.4.0 - 5.4.21
Fatal error: Call-time pass-by-reference has been removed in /in/CEReG on line 16
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Deprecated: Call-time pass-by-reference has been deprecated in /in/CEReG on line 16
Process exited with code 137.

preferences:
174.21 ms | 1395 KiB | 57 Q