3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = array(); $foo = 'foo'; $st = microtime(true); for ($i = 0; $i < 100000; $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 < 100000; $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/mdKK6 on line 16
Process exited with code 255.
Output for 5.3.4 - 5.3.27
Deprecated: Call-time pass-by-reference has been deprecated in /in/mdKK6 on line 16
Process exited with code 137.
Output for 5.2.15 - 5.2.17
Warning: Call-time pass-by-reference has been deprecated in /in/mdKK6 on line 16
Process exited with code 137.