3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function shitrand() { static $i=32; return substr(number_format('1E'.($i++), 0), -1); } for($i=0; $i<20; $i++) { var_dump(shitrand()); }
Output for 4.3.0 - 4.3.1, 5.2.1 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
string(1) "2" string(1) "6" string(1) "0" string(1) "2" string(1) "4" string(1) "2" string(1) "8" string(1) "2" string(1) "2" string(1) "8" string(1) "2" string(1) "4" string(1) "4" string(1) "8" string(1) "8" string(1) "4" string(1) "0" string(1) "2" string(1) "0" string(1) "4"
Output for 4.3.2 - 5.2.0
string(1) "0" string(1) "0" string(1) "0" string(1) "0" string(1) "0" string(1) "0" string(1) "0" string(1) "0" string(1) "0" string(1) "0" string(1) "0" string(1) "0" string(1) "0" string(1) "0" string(1) "0" string(1) "0" string(1) "0" string(1) "0" string(1) "0" string(1) "0"