3v4l.org

run code in 300+ PHP versions simultaneously
<?php $server_seed = "d8b710dfa2c8a3d990ca1dc7cc0a91754ac20aa6139fb7f6d44b58ee31ece8dc"; $round_id = "27632"; $hash = hash("sha256",$server_seed."-".$round_id); $roll = hexdec(substr($hash,0,8)) % 15; echo "Round $round_id = $roll";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sjCDq
function name:  (null)
number of ops:  25
compiled vars:  !0 = $server_seed, !1 = $round_id, !2 = $hash, !3 = $roll
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'd8b710dfa2c8a3d990ca1dc7cc0a91754ac20aa6139fb7f6d44b58ee31ece8dc'
    3     1        ASSIGN                                                   !1, '27632'
    4     2        INIT_FCALL                                               'hash'
          3        SEND_VAL                                                 'sha256'
          4        CONCAT                                           ~6      !0, '-'
          5        CONCAT                                           ~7      ~6, !1
          6        SEND_VAL                                                 ~7
          7        DO_ICALL                                         $8      
          8        ASSIGN                                                   !2, $8
    5     9        INIT_FCALL                                               'hexdec'
         10        INIT_FCALL                                               'substr'
         11        SEND_VAR                                                 !2
         12        SEND_VAL                                                 0
         13        SEND_VAL                                                 8
         14        DO_ICALL                                         $10     
         15        SEND_VAR                                                 $10
         16        DO_ICALL                                         $11     
         17        MOD                                              ~12     $11, 15
         18        ASSIGN                                                   !3, ~12
    6    19        ROPE_INIT                                     4  ~15     'Round+'
         20        ROPE_ADD                                      1  ~15     ~15, !1
         21        ROPE_ADD                                      2  ~15     ~15, '+%3D+'
         22        ROPE_END                                      3  ~14     ~15, !3
         23        ECHO                                                     ~14
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.5 ms | 1399 KiB | 19 Q