3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function rnd($seed) { srand($seed); $str = ''; for (;;) { $k = rand(0, 27); if ($k == 0) { break; } echo $k, "\n"; $str .= chr($k); } return $str; } echo rnd(-229985452);
Output for 7.1.0
14 18 11 15 10 9  
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.0.14
14 22 1 17 16 15 22 24 6 25 1 21 20 25 7 19 2 1 19 6 2 21 22 14 13 15 10 17 11 24 11 26 18 12 15 6 27 9 3 6 7 4 27