3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php error_reporting(-1); $x = substr_replace(array("x", "y"), array(), array(), 0); var_dump($x);
Output for 5.0.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
array(2) { [0]=> string(1) "x" [1]=> string(1) "y" }
Output for 4.3.0 - 4.4.9
Notice: Array to string conversion in /in/mblZ5 on line 3 Notice: Array to string conversion in /in/mblZ5 on line 3 string(10) "ArrayArray"