3v4l.org

run code in 300+ PHP versions simultaneously
<?php $server_seed = "e7e2002fb07669d046ca3b5930ffba877d47e781ca7a5dfbbd5f60a51a21a9f1"; $lotto = "0708141934"; $round_id = "161189"; $hash = hash("sha256",$server_seed."-".$lotto."-".$round_id); $roll = hexdec(substr($hash,0,8)) % 15; // Print værdien af $hash print("\$hash = $hash\n"); // Print værdien af substr($hash,0,8) print("substr(\$hash,0,8) = ".(String)substr($hash,0,8)."\n"); // Print værdien af hexdec(substr($hash,0,8)) print("hexdec(856672a7) = ".(String)hexdec(substr($hash,0,8))."\n"); // Print værdien af 856672a7 % 15 print("2238083751 % 15 = ".(2238083751 % 15)."\n"); // Print værdien af roll print("\$roll = $roll"); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sQ3fF
function name:  (null)
number of ops:  52
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, 'e7e2002fb07669d046ca3b5930ffba877d47e781ca7a5dfbbd5f60a51a21a9f1'
    4     1        ASSIGN                                                   !1, '0708141934'
    5     2        ASSIGN                                                   !2, '161189'
    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
   10    22        ROPE_INIT                                     3  ~19     '%24hash+%3D+'
         23        ROPE_ADD                                      1  ~19     ~19, !3
         24        ROPE_END                                      2  ~18     ~19, '%0A'
         25        ECHO                                                     ~18
   12    26        INIT_FCALL                                               'substr'
         27        SEND_VAR                                                 !3
         28        SEND_VAL                                                 0
         29        SEND_VAL                                                 8
         30        DO_ICALL                                         $21     
         31        CAST                                          6  ~22     $21
         32        CONCAT                                           ~23     'substr%28%24hash%2C0%2C8%29+%3D+', ~22
         33        CONCAT                                           ~24     ~23, '%0A'
         34        ECHO                                                     ~24
   14    35        INIT_FCALL                                               'hexdec'
         36        INIT_FCALL                                               'substr'
         37        SEND_VAR                                                 !3
         38        SEND_VAL                                                 0
         39        SEND_VAL                                                 8
         40        DO_ICALL                                         $25     
         41        SEND_VAR                                                 $25
         42        DO_ICALL                                         $26     
         43        CAST                                          6  ~27     $26
         44        CONCAT                                           ~28     'hexdec%28856672a7%29+%3D+', ~27
         45        CONCAT                                           ~29     ~28, '%0A'
         46        ECHO                                                     ~29
   16    47        ECHO                                                     '2238083751+%25+15+%3D+6%0A'
   18    48        NOP                                                      
         49        FAST_CONCAT                                      ~30     '%24roll+%3D+', !4
         50        ECHO                                                     ~30
   20    51      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.16 ms | 1400 KiB | 19 Q