3v4l.org

run code in 150+ 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 - 5.6.28, 7.0.0 - 7.1.0
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, hhvm-3.12.0
string(1) "," string(2) "1," string(1) "1"
Output for hhvm-3.10.0

Process exited with code 153.