3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $toto = "Test"; var_dump(count($toto)); $foo = false; var_dump(count($foo)); $foo = true; var_dump(count($foo));
based on FnJUJ
Output for 7.2.0
Warning: count(): Parameter must be an array or an object that implements Countable in /in/oMkPN on line 5 int(1) Warning: count(): Parameter must be an array or an object that implements Countable in /in/oMkPN on line 9 int(1) Warning: count(): Parameter must be an array or an object that implements Countable in /in/oMkPN on line 13 int(1)
Output for 5.3.18 - 7.1.10
int(1) int(1) int(1)