3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $input = ["red", "green", "blue", "yellow"]; function getA() { return ["red", "green", "blue", "yellow"]; }; echo array_splice(getA(), 3, 0, "purple");
based on carN3
Output for 7.0.0 - 7.2.0
Notice: Only variables should be passed by reference in /in/O0ep8 on line 9 Notice: Array to string conversion in /in/O0ep8 on line 9 Array
Output for 5.4.0 - 5.6.28
Strict Standards: Only variables should be passed by reference in /in/O0ep8 on line 9 Notice: Array to string conversion in /in/O0ep8 on line 9 Array