3v4l.org

run code in 300+ PHP versions simultaneously
<?php $prg_id = "781657"; $firstresult = '0'; $key = 6606; $s = sprintf("%d", $prg_id); for($i = 0; $i < strlen($s); $i++) { $firstresult[$i] = chr(ord($s[$i]) ^ ($key>>8)); $key = (int)ord($firstresult[$i]) + (int)$key; $key = (int)($key * 74102); $key = (int)($key + 12337); } $ascii = $firstresult; $len = strlen($ascii); $result = ""; for ($i=0; $i<$len; $i++) $result.=sprintf("%02x",ord(substr($ascii,$i,1))); echo $result; echo ' / '; $hex = $result; $key = 6606; $result = ''; $len = strlen($hex); for ($i=0; $i<$len; $i+=2) $result.=sprintf("%s", chr(hexdec(substr($hex,$i,2)))); $firstresult = $result; $result = '0'; for($i=0; $i <= strlen($firstresult)-1; $i++) { $result[$i] = chr(ord($firstresult[$i]) ^ ($key>>8)); $key = (int)ord($firstresult[$i]) + (int)$key; $key = (int)($key * 74102); $key = (int)($key + 12337); } echo $result;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 36
Branch analysis from position: 36
2 jumps found. (Code = 44) Position 1 = 39, Position 2 = 10
Branch analysis from position: 39
1 jumps found. (Code = 42) Position 1 = 59
Branch analysis from position: 59
2 jumps found. (Code = 44) Position 1 = 61, Position 2 = 45
Branch analysis from position: 61
1 jumps found. (Code = 42) Position 1 = 87
Branch analysis from position: 87
2 jumps found. (Code = 44) Position 1 = 89, Position 2 = 70
Branch analysis from position: 89
1 jumps found. (Code = 42) Position 1 = 119
Branch analysis from position: 119
2 jumps found. (Code = 44) Position 1 = 123, Position 2 = 93
Branch analysis from position: 123
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 93
2 jumps found. (Code = 44) Position 1 = 123, Position 2 = 93
Branch analysis from position: 123
Branch analysis from position: 93
Branch analysis from position: 70
2 jumps found. (Code = 44) Position 1 = 89, Position 2 = 70
Branch analysis from position: 89
Branch analysis from position: 70
Branch analysis from position: 45
2 jumps found. (Code = 44) Position 1 = 61, Position 2 = 45
Branch analysis from position: 61
Branch analysis from position: 45
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 39, Position 2 = 10
Branch analysis from position: 39
Branch analysis from position: 10
filename:       /in/1XZrB
function name:  (null)
number of ops:  125
compiled vars:  !0 = $prg_id, !1 = $firstresult, !2 = $key, !3 = $s, !4 = $i, !5 = $ascii, !6 = $len, !7 = $result, !8 = $hex
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '781657'
    3     1        ASSIGN                                                   !1, '0'
    4     2        ASSIGN                                                   !2, 6606
    5     3        INIT_FCALL                                               'sprintf'
          4        SEND_VAL                                                 '%25d'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $12     
          7        ASSIGN                                                   !3, $12
    6     8        ASSIGN                                                   !4, 0
          9      > JMP                                                      ->36
    7    10    >   INIT_FCALL                                               'chr'
         11        INIT_FCALL                                               'ord'
         12        FETCH_DIM_R                                      ~16     !3, !4
         13        SEND_VAL                                                 ~16
         14        DO_ICALL                                         $17     
         15        SR                                               ~18     !2, 8
         16        BW_XOR                                           ~19     $17, ~18
         17        SEND_VAL                                                 ~19
         18        DO_ICALL                                         $20     
         19        ASSIGN_DIM                                               !1, !4
         20        OP_DATA                                                  $20
    8    21        INIT_FCALL                                               'ord'
         22        FETCH_DIM_R                                      ~21     !1, !4
         23        SEND_VAL                                                 ~21
         24        DO_ICALL                                         $22     
         25        CAST                                          4  ~23     $22
         26        CAST                                          4  ~24     !2
         27        ADD                                              ~25     ~23, ~24
         28        ASSIGN                                                   !2, ~25
    9    29        MUL                                              ~27     !2, 74102
         30        CAST                                          4  ~28     ~27
         31        ASSIGN                                                   !2, ~28
   10    32        ADD                                              ~30     !2, 12337
         33        CAST                                          4  ~31     ~30
         34        ASSIGN                                                   !2, ~31
    6    35        PRE_INC                                                  !4
         36    >   STRLEN                                           ~34     !3
         37        IS_SMALLER                                               !4, ~34
         38      > JMPNZ                                                    ~35, ->10
   15    39    >   ASSIGN                                                   !5, !1
   17    40        STRLEN                                           ~37     !5
         41        ASSIGN                                                   !6, ~37
   18    42        ASSIGN                                                   !7, ''
   19    43        ASSIGN                                                   !4, 0
         44      > JMP                                                      ->59
   20    45    >   INIT_FCALL                                               'sprintf'
         46        SEND_VAL                                                 '%2502x'
         47        INIT_FCALL                                               'ord'
         48        INIT_FCALL                                               'substr'
         49        SEND_VAR                                                 !5
         50        SEND_VAR                                                 !4
         51        SEND_VAL                                                 1
         52        DO_ICALL                                         $41     
         53        SEND_VAR                                                 $41
         54        DO_ICALL                                         $42     
         55        SEND_VAR                                                 $42
         56        DO_ICALL                                         $43     
         57        ASSIGN_OP                                     8          !7, $43
   19    58        PRE_INC                                                  !4
         59    >   IS_SMALLER                                               !4, !6
         60      > JMPNZ                                                    ~46, ->45
   23    61    >   ECHO                                                     !7
   24    62        ECHO                                                     '+%2F+'
   27    63        ASSIGN                                                   !8, !7
   29    64        ASSIGN                                                   !2, 6606
   31    65        ASSIGN                                                   !7, ''
   33    66        STRLEN                                           ~50     !8
         67        ASSIGN                                                   !6, ~50
   34    68        ASSIGN                                                   !4, 0
         69      > JMP                                                      ->87
   35    70    >   INIT_FCALL                                               'sprintf'
         71        SEND_VAL                                                 '%25s'
         72        INIT_FCALL                                               'chr'
         73        INIT_FCALL                                               'hexdec'
         74        INIT_FCALL                                               'substr'
         75        SEND_VAR                                                 !8
         76        SEND_VAR                                                 !4
         77        SEND_VAL                                                 2
         78        DO_ICALL                                         $53     
         79        SEND_VAR                                                 $53
         80        DO_ICALL                                         $54     
         81        SEND_VAR                                                 $54
         82        DO_ICALL                                         $55     
         83        SEND_VAR                                                 $55
         84        DO_ICALL                                         $56     
         85        ASSIGN_OP                                     8          !7, $56
   34    86        ASSIGN_OP                                     1          !4, 2
         87    >   IS_SMALLER                                               !4, !6
         88      > JMPNZ                                                    ~59, ->70
   37    89    >   ASSIGN                                                   !1, !7
   40    90        ASSIGN                                                   !7, '0'
   41    91        ASSIGN                                                   !4, 0
         92      > JMP                                                      ->119
   42    93    >   INIT_FCALL                                               'chr'
         94        INIT_FCALL                                               'ord'
         95        FETCH_DIM_R                                      ~64     !1, !4
         96        SEND_VAL                                                 ~64
         97        DO_ICALL                                         $65     
         98        SR                                               ~66     !2, 8
         99        BW_XOR                                           ~67     $65, ~66
        100        SEND_VAL                                                 ~67
        101        DO_ICALL                                         $68     
        102        ASSIGN_DIM                                               !7, !4
        103        OP_DATA                                                  $68
   43   104        INIT_FCALL                                               'ord'
        105        FETCH_DIM_R                                      ~69     !1, !4
        106        SEND_VAL                                                 ~69
        107        DO_ICALL                                         $70     
        108        CAST                                          4  ~71     $70
        109        CAST                                          4  ~72     !2
        110        ADD                                              ~73     ~71, ~72
        111        ASSIGN                                                   !2, ~73
   44   112        MUL                                              ~75     !2, 74102
        113        CAST                                          4  ~76     ~75
        114        ASSIGN                                                   !2, ~76
   45   115        ADD                                              ~78     !2, 12337
        116        CAST                                          4  ~79     ~78
        117        ASSIGN                                                   !2, ~79
   41   118        PRE_INC                                                  !4
        119    >   STRLEN                                           ~82     !1
        120        SUB                                              ~83     ~82, 1
        121        IS_SMALLER_OR_EQUAL                                      !4, ~83
        122      > JMPNZ                                                    ~84, ->93
   48   123    >   ECHO                                                     !7
        124      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.87 ms | 1404 KiB | 23 Q