3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $array = array(1); $array_a = array(); $array_b = NULL; $array_c = FALSE; $array_d = 0; $array_e = 123; echo count($array)."<br/>"; echo count($array_a)."<br/>"; echo count($array_b)."<br/>"; echo count($array_c)."<br/>"; echo count($array_d)."<br/>"; echo count($array_e)."<br/>";
Output for 7.2.0
1<br/>0<br/> Warning: count(): Parameter must be an array or an object that implements Countable in /in/kIPbh on line 12 0<br/> Warning: count(): Parameter must be an array or an object that implements Countable in /in/kIPbh on line 13 1<br/> Warning: count(): Parameter must be an array or an object that implements Countable in /in/kIPbh on line 14 1<br/> Warning: count(): Parameter must be an array or an object that implements Countable in /in/kIPbh on line 15 1<br/>
Output for 4.3.0 - 7.1.10
1<br/>0<br/>0<br/>1<br/>1<br/>1<br/>