3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $uid=8193; function q2() { global $uid; $ttime=time()-(time()%60); srand(($uid+$ttime)%10000); $str=""; $n=19;$v=array("+","-","*","/","%"); while($n--) { $str.=rand(1,100); $str.=$v[rand(0,3)]; } $str.=rand(1,100); $r=1; $str="\$r=".$str.";"; eval($str); return $r; } echo q2();
Output for 7.1.0
-5680.1098584689
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.0.14
241080.3995076