3v4l.org

run code in 300+ PHP versions simultaneously
<?php $serverSeed = "a80245146d20234e2b284c0825da9dbac907be9fb17d9a76493d916d61b503f1a8f3d8b39749922d3ed6c5426d57d45fabd7c53a4e2d52a4017139abd50d2a23"; $clientSeed = "Om Hreem Shreem Hreem Kamale Kamalalaye Prasheed Prasheed Om Hreem Shreem Hreem MahaLaxmayei Namaha"; $nonce = "4198"; $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/30URc
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, 'a80245146d20234e2b284c0825da9dbac907be9fb17d9a76493d916d61b503f1a8f3d8b39749922d3ed6c5426d57d45fabd7c53a4e2d52a4017139abd50d2a23'
    4     1        ASSIGN                                                   !1, 'Om+Hreem+Shreem+Hreem+Kamale+Kamalalaye+Prasheed+Prasheed+Om+Hreem+Shreem+Hreem+MahaLaxmayei+Namaha'
    5     2        ASSIGN                                                   !2, '4198'
    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
         31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.66 ms | 941 KiB | 20 Q