3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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) { $j = 0; $key = removeExtraCharacters($key); $str = $data.""; $rtn = ""; while ($j < strlen($str)) { $rtn .= substr($key,$str[$j],1); $j++; } return $rtn; } function showDataValueMessage($data,$key) { $j = 0; $key = removeExtraCharacters($key); $rtn = ""; while ($j < strlen($data)) { $rtn .= strpos($key,$data[$j]).""; $j++; } return $rtn; } echo saveDataFormatMessage(98567320,md5(""))."\n"; echo showDataValueMessage("2b9f081d",md5(""));
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/d1PnB
function name:  (null)
number of ops:  21
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   2     0  E >   NOP                                                      
  11     1        NOP                                                      
  22     2        NOP                                                      
  32     3        INIT_FCALL                                               'savedataformatmessage'
         4        SEND_VAL                                                 98567320
         5        INIT_FCALL                                               'md5'
         6        SEND_VAL                                                 ''
         7        DO_ICALL                                         $0      
         8        SEND_VAR                                                 $0
         9        DO_FCALL                                      0  $1      
        10        CONCAT                                           ~2      $1, '%0A'
        11        ECHO                                                     ~2
  33    12        INIT_FCALL                                               'showdatavaluemessage'
        13        SEND_VAL                                                 '2b9f081d'
        14        INIT_FCALL                                               'md5'
        15        SEND_VAL                                                 ''
        16        DO_ICALL                                         $3      
        17        SEND_VAR                                                 $3
        18        DO_FCALL                                      0  $4      
        19        ECHO                                                     $4
        20      > RETURN                                                   1

Function removeextracharacters:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = 15
Branch analysis from position: 15
Jump found. Position 1 = 18, Position 2 = 4
Branch analysis from position: 18
Jump found. Position 1 = -2
Branch analysis from position: 4
Jump found. Position 1 = 11, Position 2 = 13
Branch analysis from position: 11
Jump found. Position 1 = 18, Position 2 = 4
Branch analysis from position: 18
Branch analysis from position: 4
Branch analysis from position: 13
filename:       /in/d1PnB
function name:  removeExtraCharacters
number of ops:  20
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                                                      ->15
   6     4    >   INIT_FCALL                                               'strpos'
         5        SEND_VAR                                                 !1
         6        FETCH_DIM_R                                      $5      !0, !2
         7        SEND_VAR                                                 $5
         8        DO_ICALL                                         $6      
         9        IS_IDENTICAL                                     ~7      $6, <false>
        10      > JMPZ                                                     ~7, ->13
        11    >   FETCH_DIM_R                                      $8      !0, !2
        12        ASSIGN_CONCAT                                 0          !1, $8
   7    13    >   POST_INC                                         ~10     !2
        14        FREE                                                     ~10
   5    15    >   STRLEN                                           ~11     !0
        16        IS_SMALLER                                       ~12     !2, ~11
        17      > JMPNZ                                                    ~12, ->4
   9    18    > > RETURN                                                   !1
  10    19*     > RETURN                                                   null

End of function removeextracharacters

Function savedataformatmessage:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = 20
Branch analysis from position: 20
Jump found. Position 1 = 23, Position 2 = 11
Branch analysis from position: 23
Jump found. Position 1 = -2
Branch analysis from position: 11
Jump found. Position 1 = 23, Position 2 = 11
Branch analysis from position: 23
Branch analysis from position: 11
filename:       /in/d1PnB
function name:  saveDataFormatMessage
number of ops:  25
compiled vars:  !0 = $data, !1 = $key, !2 = $j, !3 = $str, !4 = $rtn
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  $6      
         6        ASSIGN                                                   !1, $6
  14     7        CONCAT                                           ~8      !0, ''
         8        ASSIGN                                                   !3, ~8
  15     9        ASSIGN                                                   !4, ''
  16    10      > JMP                                                      ->20
  17    11    >   INIT_FCALL                                               'substr'
        12        SEND_VAR                                                 !1
        13        FETCH_DIM_R                                      $11     !3, !2
        14        SEND_VAR                                                 $11
        15        SEND_VAL                                                 1
        16        DO_ICALL                                         $12     
        17        ASSIGN_CONCAT                                 0          !4, $12
  18    18        POST_INC                                         ~14     !2
        19        FREE                                                     ~14
  16    20    >   STRLEN                                           ~15     !3
        21        IS_SMALLER                                       ~16     !2, ~15
        22      > JMPNZ                                                    ~16, ->11
  20    23    > > RETURN                                                   !4
  21    24*     > RETURN                                                   null

End of function savedataformatmessage

Function showdatavaluemessage:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = 18
Branch analysis from position: 18
Jump found. Position 1 = 21, Position 2 = 9
Branch analysis from position: 21
Jump found. Position 1 = -2
Branch analysis from position: 9
Jump found. Position 1 = 21, Position 2 = 9
Branch analysis from position: 21
Branch analysis from position: 9
filename:       /in/d1PnB
function name:  showDataValueMessage
number of ops:  23
compiled vars:  !0 = $data, !1 = $key, !2 = $j, !3 = $rtn
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  22     0  E >   RECV                                             !0      
         1        RECV                                             !1      
  23     2        ASSIGN                                                   !2, 0
  24     3        INIT_FCALL                                               'removeextracharacters'
         4        SEND_VAR                                                 !1
         5        DO_FCALL                                      0  $5      
         6        ASSIGN                                                   !1, $5
  25     7        ASSIGN                                                   !3, ''
  26     8      > JMP                                                      ->18
  27     9    >   INIT_FCALL                                               'strpos'
        10        SEND_VAR                                                 !1
        11        FETCH_DIM_R                                      $8      !0, !2
        12        SEND_VAR                                                 $8
        13        DO_ICALL                                         $9      
        14        CONCAT                                           ~10     $9, ''
        15        ASSIGN_CONCAT                                 0          !3, ~10
  28    16        POST_INC                                         ~12     !2
        17        FREE                                                     ~12
  26    18    >   STRLEN                                           ~13     !0
        19        IS_SMALLER                                       ~14     !2, ~13
        20      > JMPNZ                                                    ~14, ->9
  30    21    > > RETURN                                                   !3
  31    22*     > RETURN                                                   null

End of function showdatavaluemessage

Generated using Vulcan Logic Dumper, using php 7.3.0