3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a= array('a'=>2,'icid'=>'1123'); foreach ($a as $v){ $new = $v['icid'].","; var_dump($new); } $new = substr($new,0,(strlen($new)-1)); var_dump($new);
based on Hl6fi
Output for 5.4.0 - 7.1.10
string(1) "," Warning: Illegal string offset 'icid' in /in/FP8GN on line 4 string(2) "1," string(1) "1"
Output for 4.3.0 - 5.3.29
string(1) "," string(2) "1," string(1) "1"