3v4l.org

run code in 300+ PHP versions simultaneously
<?php function removeExtraCharacters($key) { $str = ""; $i = 0; while ($i < strlen($key)) { if (strpos($str, $key[$i]) === false) { $str .= $key[$i]; } $i++; } return $str; } function saveDataFormatMessage($data,$key) { $i = 0; $key = removeExtraCharacters($key); $str = $data.""; $rtn = ""; while ($i < strlen($str)) { $char = $str[$i]; echo $char." - ".intval($char)."\n"; $rtn .= substr($key,intval($char),1); $i++; } return $rtn; } echo saveDataFormatMessage(985651278,md5(""))."\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/r633s
function name:  (null)
number of ops:  10
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   INIT_FCALL                                               'savedataformatmessage'
          1        SEND_VAL                                                 985651278
          2        INIT_FCALL                                               'md5'
          3        SEND_VAL                                                 ''
          4        DO_ICALL                                         $0      
          5        SEND_VAR                                                 $0
          6        DO_FCALL                                      0  $1      
          7        CONCAT                                           ~2      $1, '%0A'
          8        ECHO                                                     ~2
          9      > RETURN                                                   1

Function removeextracharacters:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 4
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 13
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 4
Branch analysis from position: 17
Branch analysis from position: 4
Branch analysis from position: 13
filename:       /in/r633s
function name:  removeExtraCharacters
number of ops:  19
compiled vars:  !0 = $key, !1 = $str, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        ASSIGN                                                   !1, ''
    4     2        ASSIGN                                                   !2, 0
    5     3      > JMP                                                      ->14
    6     4    >   INIT_FCALL                                               'strpos'
          5        SEND_VAR                                                 !1
          6        FETCH_DIM_R                                      ~5      !0, !2
          7        SEND_VAL                                                 ~5
          8        DO_ICALL                                         $6      
          9        TYPE_CHECK                                    4          $6
         10      > JMPZ                                                     ~7, ->13
         11    >   FETCH_DIM_R                                      ~8      !0, !2
         12        ASSIGN_OP                                     8          !1, ~8
    7    13    >   PRE_INC                                                  !2
    5    14    >   STRLEN                                           ~11     !0
         15        IS_SMALLER                                               !2, ~11
         16      > JMPNZ                                                    ~12, ->4
    9    17    > > RETURN                                                   !1
   10    18*     > RETURN                                                   null

End of function removeextracharacters

Function savedataformatmessage:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 11
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 11
Branch analysis from position: 29
Branch analysis from position: 11
filename:       /in/r633s
function name:  saveDataFormatMessage
number of ops:  31
compiled vars:  !0 = $data, !1 = $key, !2 = $i, !3 = $str, !4 = $rtn, !5 = $char
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   12     2        ASSIGN                                                   !2, 0
   13     3        INIT_FCALL                                               'removeextracharacters'
          4        SEND_VAR                                                 !1
          5        DO_FCALL                                      0  $7      
          6        ASSIGN                                                   !1, $7
   14     7        CONCAT                                           ~9      !0, ''
          8        ASSIGN                                                   !3, ~9
   15     9        ASSIGN                                                   !4, ''
   16    10      > JMP                                                      ->26
   17    11    >   FETCH_DIM_R                                      ~12     !3, !2
         12        ASSIGN                                                   !5, ~12
   18    13        CONCAT                                           ~14     !5, '+-+'
         14        CAST                                          4  ~15     !5
         15        CONCAT                                           ~16     ~14, ~15
         16        CONCAT                                           ~17     ~16, '%0A'
         17        ECHO                                                     ~17
   19    18        INIT_FCALL                                               'substr'
         19        SEND_VAR                                                 !1
         20        CAST                                          4  ~18     !5
         21        SEND_VAL                                                 ~18
         22        SEND_VAL                                                 1
         23        DO_ICALL                                         $19     
         24        ASSIGN_OP                                     8          !4, $19
   20    25        PRE_INC                                                  !2
   16    26    >   STRLEN                                           ~22     !3
         27        IS_SMALLER                                               !2, ~22
         28      > JMPNZ                                                    ~23, ->11
   22    29    > > RETURN                                                   !4
   23    30*     > RETURN                                                   null

End of function savedataformatmessage

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.41 ms | 1402 KiB | 21 Q