3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function foo($value = null){ static $count = 4; if ($value){ $count = $value; } return ++$count; } echo foo(), ','; echo foo(25), ','; echo foo(0), ','; echo foo('abc'), ','; echo foo();
Output for 4.3.0 - 7.1.0
5,26,27,abd,abe