3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $myObj = (object)array('id' => 'foo', 'cat_1' => 'bar', 'cat_2' => 'baz'); $count = 0; foreach ($myObj as $key => $value) { if (strpos($key, 'cat_') === 0) { $count++; } } var_dump($count);
Output for 4.3.0 - 5.6.21, hhvm-3.9.1, hhvm-3.11.0 - 3.12.0, 7.0.0 - 7.0.6
int(2)
Output for hhvm-3.10.0

Process exited with code 153.