3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $p = 80; $c = 0.05; $s = 837; $f = 15; $w = 26 * 4; $h = 0; for ($m=0; $m <= $w; $m++) { $j = 0; for ($i=0; $i<$s * $p; $i++) { if (mt_rand(0, 100) <= $c * 100) { $h = max($h, $j); $j = 0; } else { $j += $f; } } } var_dump($h);