3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.49 ms | 1465 KiB | 17 Q