3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php var_dump(count([2,5,6])); var_dump(count(8));
Output for 7.2.0
int(3) Warning: count(): Parameter must be an array or an object that implements Countable in /in/grGPW on line 4 int(1)
Output for 5.4.10 - 7.1.10
int(3) int(1)
Output for 5.3.20 - 5.3.29
Parse error: syntax error, unexpected '[', expecting ')' in /in/grGPW on line 3
Process exited with code 255.