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 - 7.0.0alpha2, hhvm-3.6.1
int(2)