3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $str = "abababas"; $d1 = []; $d2 = []; var_dump(count($str));
based on mncDQ
Output for 7.2.0
Warning: count(): Parameter must be an array or an object that implements Countable in /in/oMb3J on line 7 int(1)
Output for 5.4.10 - 7.1.10
int(1)
Output for 5.3.20 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/oMb3J on line 4
Process exited with code 255.