3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $str="apple,mango,banana"; $lst = explode(",", $str); /*print the array*/ foreach($lst as $item) { echo "$lst "; } ?>
based on I405Z
Output for 7.0.20, 7.1.5 - 7.2.0
Notice: Array to string conversion in /in/kOuAp on line 8 Array Notice: Array to string conversion in /in/kOuAp on line 8 Array Notice: Array to string conversion in /in/kOuAp on line 8 Array
Output for 5.4.0 - 7.0.6, 7.1.0
Notice: Array to string conversion in /in/kOuAp on line 9 Array Notice: Array to string conversion in /in/kOuAp on line 9 Array Notice: Array to string conversion in /in/kOuAp on line 9 Array
Output for 4.3.0 - 5.3.29
Array Array Array