Bugs & Features

results for ETe6T @ 2012-12-10 19:38:23

<?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.6, php7@20140507 - 20150301, hhvm-3.5.0 - 3.5.1
int(2)