3v4l.org

run code in 300+ PHP versions simultaneously
<?php $serverSeed = "fa35a4792599b2e95d6145e8ad690f341dacbf7c8ab4d9448a767c0dcac0f191"; $clientSeed = "b9de60be57eb55ae5b9f2ad98226722cd91f039a"; $nonce = "0"; $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/HIvkT
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
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'fa35a4792599b2e95d6145e8ad690f341dacbf7c8ab4d9448a767c0dcac0f191'
    4     1        ASSIGN                                                   !1, 'b9de60be57eb55ae5b9f2ad98226722cd91f039a'
    5     2        ASSIGN                                                   !2, '0'
    7     3        CONCAT                                           ~9      !0, '-'
          4        CONCAT                                           ~10     ~9, !1
          5        CONCAT                                           ~11     ~10, '-'
          6        CONCAT                                           ~12     ~11, !2
          7        ASSIGN                                                   !3, ~12
    9     8    >   INIT_FCALL                                               'sha1'
          9        SEND_VAR                                                 !3
         10        DO_ICALL                                         $14     
         11        ASSIGN                                                   !3, $14
   10    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
   11    21        IS_SMALLER                                               4294960000, !4
         22      > JMPNZ                                                    ~19, ->8
   13    23    >   MOD                                              ~20     !4, 10000
         24        DIV                                              ~21     ~20, 100
         25        ASSIGN                                                   !5, ~21
   15    26        IS_SMALLER                                               !5, 0
         27      > JMPZ                                                     ~23, ->30
   16    28    >   MUL                                              ~24     !5, -1
         29        ASSIGN                                                   !5, ~24
   19    30    >   ECHO                                                     !5
   20    31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.87 ms | 1396 KiB | 19 Q