3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $o = new stdClass(); $o->something = 'asdasd'; $o->foo = 'as'; $o->nana = null; var_dump(count($o), (array) $o);
Output for 7.2.0
Warning: count(): Parameter must be an array or an object that implements Countable in /in/GkaDp on line 8 int(1) array(3) { ["something"]=> string(6) "asdasd" ["foo"]=> string(2) "as" ["nana"]=> NULL }
Output for 4.3.0 - 7.1.7
int(1) array(3) { ["something"]=> string(6) "asdasd" ["foo"]=> string(2) "as" ["nana"]=> NULL }