3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $str = "NODATA"; var_dump(count($str)); foreach ($str as $key => $value) { echo $v; } ?>
Output for 7.2.0
Warning: count(): Parameter must be an array or an object that implements Countable in /in/nV2KM on line 3 int(1) Warning: Invalid argument supplied for foreach() in /in/nV2KM on line 4
Output for 5.3.19 - 7.1.10
int(1) Warning: Invalid argument supplied for foreach() in /in/nV2KM on line 4