3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Foo { public $a = 42; } $obj = new Foo; unset($obj->a); $arr = (object) $obj; var_dump(count($arr));
based on frgTD
Output for 7.2.0
Warning: count(): Parameter must be an array or an object that implements Countable in /in/jP5Pm on line 10 int(1)
Output for 5.3.19 - 7.1.10
int(1)