3v4l.org

run code in 500+ PHP versions simultaneously
<?php // Fill Server seed $server_seed = ""; // Fill Public seed $public_seed = ""; // Fill Round Number $round = ""; //---------------- if ($server_seed !== "" && $public_seed !== "" && $round !== "") { $hash = hash('sha256', $server_seed . "-" . $public_seed . "-" . $round); $roll = hexdec(substr($hash, 0, 8)) % 15; if ($roll === 0) { $roll_colour = 'Dice'; } elseif ($roll <= 7) { $roll_colour = 'T'; } else { $roll_colour = 'CT'; } echo "Roll: $roll\n"; echo "Win: $roll_colour\n"; } else { echo "Please fill in the initial variables: \$server_seed, \$public_seed, and \$round.\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
2 jumps found. (Code = 46) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 45
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 29, Position 2 = 31
Branch analysis from position: 29
1 jumps found. (Code = 42) Position 1 = 36
Branch analysis from position: 36
1 jumps found. (Code = 42) Position 1 = 46
Branch analysis from position: 46
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 31
2 jumps found. (Code = 43) Position 1 = 33, Position 2 = 35
Branch analysis from position: 33
1 jumps found. (Code = 42) Position 1 = 36
Branch analysis from position: 36
Branch analysis from position: 35
1 jumps found. (Code = 42) Position 1 = 46
Branch analysis from position: 46
Branch analysis from position: 45
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
Branch analysis from position: 7
filename:       /in/V8Jna
function name:  (null)
number of ops:  47
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
-----------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                       !0, ''
    7     1        ASSIGN                                                       !1, ''
   10     2        ASSIGN                                                       !2, ''
   12     3        IS_NOT_IDENTICAL                                     ~9      !0, ''
          4      > JMPZ_EX                                              ~9      ~9, ->7
          5    >   IS_NOT_IDENTICAL                                     ~10     !1, ''
          6        BOOL                                                 ~9      ~10
          7    > > JMPZ_EX                                              ~9      ~9, ->10
          8    >   IS_NOT_IDENTICAL                                     ~11     !2, ''
          9        BOOL                                                 ~9      ~11
         10    > > JMPZ                                                         ~9, ->45
   13    11    >   INIT_FCALL                                                   'hash'
         12        SEND_VAL                                                     'sha256'
         13        CONCAT                                               ~12     !0, '-'
         14        CONCAT                                               ~13     ~12, !1
         15        CONCAT                                               ~14     ~13, '-'
         16        CONCAT                                               ~15     ~14, !2
         17        SEND_VAL                                                     ~15
         18        DO_ICALL                                             $16     
         19        ASSIGN                                                       !3, $16
   14    20        INIT_FCALL                                                   'hexdec'
         21        FRAMELESS_ICALL_3                substr              ~18     !3, 0
         22        OP_DATA                                                      8
         23        SEND_VAL                                                     ~18
         24        DO_ICALL                                             $19     
         25        MOD                                                  ~20     $19, 15
         26        ASSIGN                                                       !4, ~20
   16    27        IS_IDENTICAL                                                 !4, 0
         28      > JMPZ                                                         ~22, ->31
   17    29    >   ASSIGN                                                       !5, 'Dice'
   16    30      > JMP                                                          ->36
   18    31    >   IS_SMALLER_OR_EQUAL                                          !4, 7
         32      > JMPZ                                                         ~24, ->35
   19    33    >   ASSIGN                                                       !5, 'T'
   18    34      > JMP                                                          ->36
   21    35    >   ASSIGN                                                       !5, 'CT'
   24    36    >   ROPE_INIT                                         3  ~28     'Roll%3A+'
         37        ROPE_ADD                                          1  ~28     ~28, !4
         38        ROPE_END                                          2  ~27     ~28, '%0A'
         39        ECHO                                                         ~27
   25    40        ROPE_INIT                                         3  ~31     'Win%3A+'
         41        ROPE_ADD                                          1  ~31     ~31, !5
         42        ROPE_END                                          2  ~30     ~31, '%0A'
         43        ECHO                                                         ~30
   12    44      > JMP                                                          ->46
   27    45    >   ECHO                                                         'Please+fill+in+the+initial+variables%3A+%24server_seed%2C+%24public_seed%2C+and+%24round.%0A'
   28    46    > > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
133.99 ms | 485 KiB | 9 Q