3v4l.org

run code in 300+ 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 = 48
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 32, Position 2 = 34
Branch analysis from position: 32
1 jumps found. (Code = 42) Position 1 = 39
Branch analysis from position: 39
1 jumps found. (Code = 42) Position 1 = 49
Branch analysis from position: 49
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 34
2 jumps found. (Code = 43) Position 1 = 36, Position 2 = 38
Branch analysis from position: 36
1 jumps found. (Code = 42) Position 1 = 39
Branch analysis from position: 39
Branch analysis from position: 38
1 jumps found. (Code = 42) Position 1 = 49
Branch analysis from position: 49
Branch analysis from position: 48
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:  50
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, ->48
   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        INIT_FCALL                                               'substr'
         22        SEND_VAR                                                 !3
         23        SEND_VAL                                                 0
         24        SEND_VAL                                                 8
         25        DO_ICALL                                         $18     
         26        SEND_VAR                                                 $18
         27        DO_ICALL                                         $19     
         28        MOD                                              ~20     $19, 15
         29        ASSIGN                                                   !4, ~20
   16    30        IS_IDENTICAL                                             !4, 0
         31      > JMPZ                                                     ~22, ->34
   17    32    >   ASSIGN                                                   !5, 'Dice'
   16    33      > JMP                                                      ->39
   18    34    >   IS_SMALLER_OR_EQUAL                                      !4, 7
         35      > JMPZ                                                     ~24, ->38
   19    36    >   ASSIGN                                                   !5, 'T'
   18    37      > JMP                                                      ->39
   21    38    >   ASSIGN                                                   !5, 'CT'
   24    39    >   ROPE_INIT                                     3  ~28     'Roll%3A+'
         40        ROPE_ADD                                      1  ~28     ~28, !4
         41        ROPE_END                                      2  ~27     ~28, '%0A'
         42        ECHO                                                     ~27
   25    43        ROPE_INIT                                     3  ~31     'Win%3A+'
         44        ROPE_ADD                                      1  ~31     ~31, !5
         45        ROPE_END                                      2  ~30     ~31, '%0A'
         46        ECHO                                                     ~30
   12    47      > JMP                                                      ->49
   27    48    >   ECHO                                                     'Please+fill+in+the+initial+variables%3A+%24server_seed%2C+%24public_seed%2C+and+%24round.%0A'
   28    49    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.94 ms | 1017 KiB | 16 Q