3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $serverSeed = '0ed77ea00093a452b34a964434af63a634ab4e5bbe3b55e923f0a697139a93dfa91b3e1bacca6954d170f91bef7c6f06b0b72247cb74237f1e265fbcfe71b511'; $clientSeed = 'ed27f61e555abadeefe5fa69925935a7a95ee242'; $nonce = 2400; for($nonce =1; $nonce < 10000; $nonce++){ $seed = $serverSeed.'-'.$clientSeed.'-'.$nonce; do { $seed = sha1($seed); $lucky = hexdec(substr($seed,0,8)); } while ($lucky > 4294960000); $luckyNumber = ($lucky % 10000) / 100; if ($luckyNumber < 0) $luckyNumber = -$luckyNumber; if ($luckyNumber > 98.01){ echo $nonce.":".$luckyNumber; echo nl2br ("\n"); } }
based on Wn9hk
Output for 5.6.30, hhvm-3.18.5 - 3.22.0, 7.0.30 - 7.3.0alpha1
4:99<br /> 77:99.48<br /> 130:98.15<br /> 283:98.37<br /> 334:99.98<br /> 390:98.91<br /> 403:99.63<br /> 457:98.02<br /> 578:99.29<br /> 589:99.01<br /> 680:98.49<br /> 685:99.96<br /> 693:98.06<br /> 730:98.31<br /> 768:99.59<br /> 773:98.05<br /> 778:98.41<br /> 992:99.6<br /> 1018:99.75<br /> 1301:99.54<br /> 1309:99.85<br /> 1312:99.55<br /> 1322:98.76<br /> 1379:98.29<br /> 1440:98.87<br /> 1441:99.1<br /> 1489:98.4<br /> 1674:98.22<br /> 1818:99.59<br /> 1930:98.56<br /> 1933:99.27<br /> 1970:98.52<br /> 1983:98.05<br /> 2052:99.39<br /> 2057:99.85<br /> 2069:98.69<br /> 2265:98.45<br /> 2269:98.58<br /> 2327:99.4<br /> 2345:98.04<br /> 2381:99.51<br /> 2399:99.12<br /> 2437:99.88<br /> 2628:98.39<br /> 2687:98.22<br /> 2709:99.78<br /> 2751:98.72<br /> 2788:98.58<br /> 2807:98.08<br /> 2865:99.14<br /> 2933:98.26<br /> 2986:99.94<br /> 3043:98.66<br /> 3049:99.37<br /> 3149:99.33<br /> 3154:99.45<br /> 3196:99.58<br /> 3254:98.93<br /> 3380:98.98<br /> 3535:99.89<br /> 3627:98.26<br /> 3686:98.84<br /> 3716:98.25<br /> 3726:98.03<br /> 3777:98.62<br /> 3837:99.61<br /> 3910:99.39<br /> 4035:98.29<br /> 4102:99.18<br /> 4113:99.03<br /> 4160:99.42<br /> 4171:99.31<br /> 4220:99.07<br /> 4244:99.88<br /> 4292:98.46<br /> 4350:98.46<br /> 4418:98.17<br /> 4419:98.52<br /> 4538:99.3<br /> 4553:98.35<br /> 4570:98.27<br /> 4612:98.74<br /> 4653:98.08<br /> 4700:99.15<br /> 4733:99.88<br /> 4866:98.76<br /> 4963:98.06<br /> 5123:99.32<br /> 5149:98.59<br /> 5235:98.43<br /> 5360:99<br /> 5403:98.31<br /> 5416:99.44<br /> 5458:99.45<br /> 5525:98.9<br /> 5545:98.11<br /> 5567:98.83<br /> 5641:99.22<br /> 5683:99.27<br /> 5763:99.9<br /> 5787:98.05<br /> 5850:98.12<br /> 5866:99.32<br /> 5899:99.09<br /> 5927:99.37<br /> 5974:98.84<br /> 5994:99.03<br /> 6015:98.31<br /> 6081:99.03<br /> 6086:99.32<br /> 6181:99.52<br /> 6232:99.6<br /> 6271:98.61<br /> 6367:99.87<br /> 6451:99.72<br /> 6510:98.82<br /> 6532:98.7<br /> 6557:99.99<br /> 6559:98.27<br /> 6561:99.2<br /> 6629:98.74<br /> 6647:98.21<br /> 6667:99.29<br /> 6788:99.75<br /> 6789:98.94<br /> 6818:99.52<br /> 6821:98.56<br /> 6852:99.55<br /> 6859:99.71<br /> 6887:99.84<br /> 6902:98.55<br /> 6929:99.65<br /> 7014:98.8<br /> 7074:98.97<br /> 7104:99.27<br /> 7221:98.36<br /> 7239:98.77<br /> 7279:99.19<br /> 7284:99.47<br /> 7294:98.41<br /> 7375:98.59<br /> 7384:99.38<br /> 7415:99.78<br /> 7507:99.53<br /> 7521:99.93<br /> 7560:98.92<br /> 7602:98.61<br /> 7650:99.09<br /> 7670:99.35<br /> 7932:98.34<br /> 7987:98.37<br /> 8060:99.58<br /> 8074:98.2<br /> 8082:99.36<br /> 8090:99.23<br /> 8192:99.06<br /> 8196:99.04<br /> 8362:98.49<br /> 8369:99.14<br /> 8392:98.79<br /> 8404:99.27<br /> 8420:99.04<br /> 8437:99.96<br /> 8469:99.8<br /> 8475:98.37<br /> 8523:98.33<br /> 8533:98.8<br /> 8566:99.31<br /> 8570:98.02<br /> 8642:99.95<br /> 8747:99.49<br /> 8750:99.68<br /> 8752:99.49<br /> 8782:99.4<br /> 8792:98.06<br /> 8923:98.42<br /> 9012:98.13<br /> 9050:99.22<br /> 9086:98.66<br /> 9088:99.64<br /> 9156:99.21<br /> 9160:99.75<br /> 9175:98.94<br /> 9406:99.53<br /> 9408:98.21<br /> 9436:99.41<br /> 9469:98.31<br /> 9548:98.19<br /> 9573:99.87<br /> 9579:99.2<br /> 9583:98.45<br /> 9596:99.73<br /> 9725:99.15<br /> 9731:98.68<br /> 9796:98.33<br /> 9825:98.31<br /> 9856:99.46<br /> 9909:99.54<br /> 9937:98.79<br />