3v4l.org

run code in 300+ PHP versions simultaneously
<?php $serverSeed = "486d6afbfd8334739ced51a3e82602a08e98c867298d29e9427019b2424531721792735e96d69362500d7e06d7fdada659bc393d8dfa0522def4fc00812a402c"; $clientSeed = "4g0woassye3p2nt8gasaj7achzfoff1its0y6eu0ge6c2c5vhbpv3zxwsg7a"; $nonce = "286"; $seed = $serverSeed.'-'.$clientSeed.'-'.$nonce; do { $seed = sha1($seed); $lucky = hexdec(substr($seed,0,8)); } while ($lucky > 4294960000); $luckyNumber = ($lucky % 10000) / 100; if ($luckyNumber < 0) $luckyNumber = -$luckyNumber; echo $luckyNumber;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 8
Branch analysis from position: 23
2 jumps found. (Code = 43) Position 1 = 28, Position 2 = 30
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 30
Branch analysis from position: 8
filename:       /in/ao4d7
function name:  (null)
number of ops:  32
compiled vars:  !0 = $serverSeed, !1 = $clientSeed, !2 = $nonce, !3 = $seed, !4 = $lucky, !5 = $luckyNumber
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, '486d6afbfd8334739ced51a3e82602a08e98c867298d29e9427019b2424531721792735e96d69362500d7e06d7fdada659bc393d8dfa0522def4fc00812a402c'
    5     1        ASSIGN                                                   !1, '4g0woassye3p2nt8gasaj7achzfoff1its0y6eu0ge6c2c5vhbpv3zxwsg7a'
    6     2        ASSIGN                                                   !2, '286'
    8     3        CONCAT                                           ~9      !0, '-'
          4        CONCAT                                           ~10     ~9, !1
          5        CONCAT                                           ~11     ~10, '-'
          6        CONCAT                                           ~12     ~11, !2
          7        ASSIGN                                                   !3, ~12
   10     8    >   INIT_FCALL                                               'sha1'
          9        SEND_VAR                                                 !3
         10        DO_ICALL                                         $14     
         11        ASSIGN                                                   !3, $14
   11    12        INIT_FCALL                                               'hexdec'
         13        INIT_FCALL                                               'substr'
         14        SEND_VAR                                                 !3
         15        SEND_VAL                                                 0
         16        SEND_VAL                                                 8
         17        DO_ICALL                                         $16     
         18        SEND_VAR                                                 $16
         19        DO_ICALL                                         $17     
         20        ASSIGN                                                   !4, $17
   12    21        IS_SMALLER                                               4294960000, !4
         22      > JMPNZ                                                    ~19, ->8
   14    23    >   MOD                                              ~20     !4, 10000
         24        DIV                                              ~21     ~20, 100
         25        ASSIGN                                                   !5, ~21
   16    26        IS_SMALLER                                               !5, 0
         27      > JMPZ                                                     ~23, ->30
   17    28    >   MUL                                              ~24     !5, -1
         29        ASSIGN                                                   !5, ~24
   20    30    >   ECHO                                                     !5
         31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.04 ms | 1396 KiB | 19 Q