3v4l.org

run code in 300+ PHP versions simultaneously
<?php $server_seed = "63a7db0259ce35e50eb0949e279c420c9fffcff37278e1ae04fea329a7ffeec4"; $public_seed = ""; $round = "6472802"; $hash = hash('sha256', $server_seed . "-" . $public_seed . "-" . $round); $roll = hexdec(substr($hash, 0, 8)) % 15; if ($roll == 0) $roll_colour == 'bonus'; echo("Roll: $roll\nColour: $roll_colour");
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 26
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
filename:       /in/5nGVm
function name:  (null)
number of ops:  32
compiled vars:  !0 = $server_seed, !1 = $public_seed, !2 = $round, !3 = $hash, !4 = $roll, !5 = $roll_colour
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '63a7db0259ce35e50eb0949e279c420c9fffcff37278e1ae04fea329a7ffeec4'
    4     1        ASSIGN                                                   !1, ''
    5     2        ASSIGN                                                   !2, '6472802'
    6     3        INIT_FCALL                                               'hash'
          4        SEND_VAL                                                 'sha256'
          5        CONCAT                                           ~9      !0, '-'
          6        CONCAT                                           ~10     ~9, !1
          7        CONCAT                                           ~11     ~10, '-'
          8        CONCAT                                           ~12     ~11, !2
          9        SEND_VAL                                                 ~12
         10        DO_ICALL                                         $13     
         11        ASSIGN                                                   !3, $13
    7    12        INIT_FCALL                                               'hexdec'
         13        INIT_FCALL                                               'substr'
         14        SEND_VAR                                                 !3
         15        SEND_VAL                                                 0
         16        SEND_VAL                                                 8
         17        DO_ICALL                                         $15     
         18        SEND_VAR                                                 $15
         19        DO_ICALL                                         $16     
         20        MOD                                              ~17     $16, 15
         21        ASSIGN                                                   !4, ~17
    8    22        IS_EQUAL                                                 !4, 0
         23      > JMPZ                                                     ~19, ->26
         24    >   IS_EQUAL                                         ~20     !5, 'bonus'
         25        FREE                                                     ~20
   10    26    >   ROPE_INIT                                     4  ~22     'Roll%3A+'
         27        ROPE_ADD                                      1  ~22     ~22, !4
         28        ROPE_ADD                                      2  ~22     ~22, '%0AColour%3A+'
         29        ROPE_END                                      3  ~21     ~22, !5
         30        ECHO                                                     ~21
         31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
180.23 ms | 1396 KiB | 19 Q