3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $obj = new stdClass(); $obj->foo = 'foo'; $obj->bar = 'bar'; $arr = array('foo' => 'foo', 'bar' => 'bar'); var_dump($obj); var_dump(count($obj)); var_dump(count($arr));
based on s7qIt
Output for 5.0.0 - 7.1.0
object(stdClass)#1 (2) { ["foo"]=> string(3) "foo" ["bar"]=> string(3) "bar" } int(1) int(2)
Output for 4.3.0 - 4.4.9
object(stdClass)(2) { ["foo"]=> string(3) "foo" ["bar"]=> string(3) "bar" } int(1) int(2)