3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $x=500; $xx=$x; $a=60; $q=10; $qq=0.03; $s=0; for ($i=$qq;; $i=$i+$i*$a*0.01) { $x-=$i; echo ($s+1).">>>". ($xx-$x)."\n##>>>(". $i.")\n"; if ($x <0) break; $y=$x; $s++; $c=$i; } echo "\n#######\n"; echo ($c)."///".$s."\\\\\\ \n".($xx-$x).">>>n>>".(-$x)."\nend>>>". ($y); ?>
based on Aaadu
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.3.0rc3
1>>>0.029999999999973 ##>>>(0.03) 2>>>0.077999999999975 ##>>>(0.048) 3>>>0.15479999999997 ##>>>(0.0768) 4>>>0.27767999999998 ##>>>(0.12288) 5>>>0.474288 ##>>>(0.196608) 6>>>0.78886080000001 ##>>>(0.3145728) 7>>>1.29217728 ##>>>(0.50331648) 8>>>2.097483648 ##>>>(0.805306368) 9>>>3.3859738368 ##>>>(1.2884901888) 10>>>5.44755813888 ##>>>(2.06158430208) 11>>>8.746093022208 ##>>>(3.298534883328) 12>>>14.023748835533 ##>>>(5.2776558133248) 13>>>22.467998136853 ##>>>(8.4442493013197) 14>>>35.978797018964 ##>>>(13.510798882111) 15>>>57.596075230342 ##>>>(21.617278211378) 16>>>92.183720368548 ##>>>(34.587645138205) 17>>>147.52395258968 ##>>>(55.340232221129) 18>>>236.06832414348 ##>>>(88.544371553806) 19>>>377.73931862957 ##>>>(141.67099448609) 20>>>604.41290980731 ##>>>(226.67359117774) ####### 141.67099448609///19\\\ 604.41290980731>>>n>>104.41290980731 end>>>122.26068137043