3v4l.org

run code in 300+ PHP versions simultaneously
<?php $server_seed = ""; $lotto = "1016171938"; $round_id = "11897"; $hash = hash("sha256",$server_seed."-".$lotto."-".$round_id); $roll = hexdec(substr($hash,0,8)) % 15; // Print værdien af $hash print("\$hash = $hash</br>"); // Prifdec(856672a7) = ".(String)hexdec(substr($hash,0,8))."</br>"); // Print værdien af 856672a7 % 15 print("2238083751 % 15 = ".(2238083751 % 15)."</br>"); // 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/5oLNu
function name:  (null)
number of ops:  31
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, ''
    4     1        ASSIGN                                                   !1, '1016171938'
    5     2        ASSIGN                                                   !2, '11897'
    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, '%3C%2Fbr%3E'
         25        ECHO                                                     ~18
   13    26        ECHO                                                     '2238083751+%25+15+%3D+6%3C%2Fbr%3E'
   15    27        NOP                                                      
         28        FAST_CONCAT                                      ~21     '%24roll+%3D+', !4
         29        ECHO                                                     ~21
   17    30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.21 ms | 1395 KiB | 19 Q