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'].","; } $new = substr($new,0,(strlen($new)-1)); var_dump($new);
Output for 5.4.0 - 5.6.28, 7.0.0 - 7.1.0
Warning: Illegal string offset 'icid' in /in/sXrZX on line 4 string(1) "1"
Output for 4.3.0 - 5.3.29, hhvm-3.12.0
string(1) "1"
Output for hhvm-3.10.0

Process exited with code 153.