3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = [ 'test' => 1, 'test2' => 2, ]; var_dump(sizeof($a)); class Test { private $test = 1; private $test2 = 2; } $b = new Test(); var_dump(sizeof($b));
based on JfAK1
Output for 7.2.0 - 7.3.1
int(2) Warning: sizeof(): Parameter must be an array or an object that implements Countable in /in/uSnik on line 19 int(1)
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.1.25
int(2) int(1)