3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $to = explode(" ", substr("hello how are you bn",1,-1)); $lang = $to[count($arr)-1]; $txt = array_slice($to, 0, count($arr)-1,TRUE); echo($txt); echo("!!!"); echo($lang); ?>
Output for 5.4.0 - 7.1.0
Notice: Undefined variable: arr in /in/5Kf2b on line 3 Notice: Undefined offset: -1 in /in/5Kf2b on line 3 Notice: Undefined variable: arr in /in/5Kf2b on line 4 Notice: Array to string conversion in /in/5Kf2b on line 6 Array!!!
Output for 5.3.0 - 5.3.29
Notice: Undefined variable: arr in /in/5Kf2b on line 3 Notice: Undefined offset: -1 in /in/5Kf2b on line 3 Notice: Undefined variable: arr in /in/5Kf2b on line 4 Array!!!
Output for 5.0.4 - 5.2.17
Notice: Undefined variable: arr in /in/5Kf2b on line 3 Notice: Undefined offset: -1 in /in/5Kf2b on line 3 Notice: Undefined variable: arr in /in/5Kf2b on line 4 Array!!!
Output for 5.0.2 - 5.0.3
Notice: Undefined variable: arr in /in/5Kf2b on line 3 Notice: Undefined offset: -1 in /in/5Kf2b on line 3 Notice: Undefined variable: arr in /in/5Kf2b on line 4 Array!!!
Output for 4.3.0 - 5.0.1
Notice: Undefined variable: arr in /in/5Kf2b on line 3 Notice: Undefined offset: -1 in /in/5Kf2b on line 3 Notice: Undefined variable: arr in /in/5Kf2b on line 4 Warning: Wrong parameter count for array_slice() in /in/5Kf2b on line 4 !!!