3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<? function implode_r($glue,$arr){ $ret_str = ""; foreach($arr as $a){ $ret_str .= (is_array($a)) ? implode_r($glue,$a) : "," . $a; } return $ret_str; } ?> $items = implode_r("",$items[0]);
Output for 5.4.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
$items = implode_r("",$items[0]);
Output for 4.3.0 - 5.3.29
<? function implode_r($glue,$arr){ $ret_str = ""; foreach($arr as $a){ $ret_str .= (is_array($a)) ? implode_r($glue,$a) : "," . $a; } return $ret_str; } ?> $items = implode_r("",$items[0]);