3v4l.org

run code in 300+ PHP versions simultaneously
<?php $server_seed = "39b7d32fcb743c244c569a56d6de4dc27577d6277d6cf155bdcba6d05befcb34"; $lotto = "0422262831"; $round_id = i; $hash = hash("sha256",$server_seed."-".$lotto."-".$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/BlLt2
function name:  (null)
number of ops:  29
compiled vars:  !0 = $server_seed, !1 = $lotto, !2 = $round_id, !3 = $hash, !4 = $roll
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '39b7d32fcb743c244c569a56d6de4dc27577d6277d6cf155bdcba6d05befcb34'
    4     1        ASSIGN                                                   !1, '0422262831'
    5     2        FETCH_CONSTANT                                   ~7      'i'
          3        ASSIGN                                                   !2, ~7
    6     4        INIT_FCALL                                               'hash'
          5        SEND_VAL                                                 'sha256'
          6        CONCAT                                           ~9      !0, '-'
          7        CONCAT                                           ~10     ~9, !1
          8        CONCAT                                           ~11     ~10, '-'
          9        CONCAT                                           ~12     ~11, !2
         10        SEND_VAL                                                 ~12
         11        DO_ICALL                                         $13     
         12        ASSIGN                                                   !3, $13
    7    13        INIT_FCALL                                               'hexdec'
         14        INIT_FCALL                                               'substr'
         15        SEND_VAR                                                 !3
         16        SEND_VAL                                                 0
         17        SEND_VAL                                                 8
         18        DO_ICALL                                         $15     
         19        SEND_VAR                                                 $15
         20        DO_ICALL                                         $16     
         21        MOD                                              ~17     $16, 15
         22        ASSIGN                                                   !4, ~17
    8    23        ROPE_INIT                                     4  ~20     'Round+'
         24        ROPE_ADD                                      1  ~20     ~20, !2
         25        ROPE_ADD                                      2  ~20     ~20, '+%3D+'
         26        ROPE_END                                      3  ~19     ~20, !4
         27        ECHO                                                     ~19
         28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.98 ms | 1395 KiB | 19 Q