3v4l.org

run code in 300+ PHP versions simultaneously
<?php $aryParam = array(); $userid="sondang"; $ipaddress="10.0.0.1"; $type="OK"; $action="mkdir"; $aryParam[] = $userid; $aryParam[] = $ipaddress; $aryParam[] = $type; $aryParam[] = $action; $path = "startia/abc/test.txt"; //ObjName $objname = $path; $len = mb_strlen($path); if($len > 0 && mb_substr($objname, 0, 2) == '//'){ $objname = mb_substr($objname, 2); } if($len > 0 && mb_substr($objname, 0, 1) == '/'){ $objname = mb_substr($objname, 1); } $objname = "admin".'/'.$objname; $aryParam[] = $objname; //Comment $foldernames = mb_split("/", $objname); $topfolder = $foldernames[0]; $comment = $userid.'|'.$ipaddress.'|'.$topfolder.'|'.$action.'|'.$type; if($action == 'rename'){ $comment .= '|'.$folder1.'|'.$folder2; }else{ //mkdir, rmdir $len = mb_strlen($topfolder); $without_top = mb_substr($objname, $len); $len = mb_strlen($without_top); if($len > 0 && mb_substr($without_top, 0, 1) == '/'){ $without_top = mb_substr($without_top, 1); } $comment .= '|'.$without_top; } $aryParam[] = $comment; print_r($aryParam);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 21, Position 2 = 28
Branch analysis from position: 21
2 jumps found. (Code = 43) Position 1 = 29, Position 2 = 34
Branch analysis from position: 29
2 jumps found. (Code = 46) Position 1 = 36, Position 2 = 43
Branch analysis from position: 36
2 jumps found. (Code = 43) Position 1 = 44, Position 2 = 49
Branch analysis from position: 44
2 jumps found. (Code = 43) Position 1 = 71, Position 2 = 76
Branch analysis from position: 71
1 jumps found. (Code = 42) Position 1 = 106
Branch analysis from position: 106
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 76
2 jumps found. (Code = 46) Position 1 = 91, Position 2 = 98
Branch analysis from position: 91
2 jumps found. (Code = 43) Position 1 = 99, Position 2 = 104
Branch analysis from position: 99
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 104
Branch analysis from position: 98
Branch analysis from position: 49
Branch analysis from position: 43
Branch analysis from position: 34
Branch analysis from position: 28
filename:       /in/7R649
function name:  (null)
number of ops:  112
compiled vars:  !0 = $aryParam, !1 = $userid, !2 = $ipaddress, !3 = $type, !4 = $action, !5 = $path, !6 = $objname, !7 = $len, !8 = $foldernames, !9 = $topfolder, !10 = $comment, !11 = $folder1, !12 = $folder2, !13 = $without_top
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, 'sondang'
    4     2        ASSIGN                                                   !2, '10.0.0.1'
    5     3        ASSIGN                                                   !3, 'OK'
    6     4        ASSIGN                                                   !4, 'mkdir'
    7     5        ASSIGN_DIM                                               !0
          6        OP_DATA                                                  !1
    8     7        ASSIGN_DIM                                               !0
          8        OP_DATA                                                  !2
    9     9        ASSIGN_DIM                                               !0
         10        OP_DATA                                                  !3
   10    11        ASSIGN_DIM                                               !0
         12        OP_DATA                                                  !4
   11    13        ASSIGN                                                   !5, 'startia%2Fabc%2Ftest.txt'
   13    14        ASSIGN                                                   !6, !5
   14    15        INIT_FCALL                                               'mb_strlen'
         16        SEND_VAR                                                 !5
         17        DO_ICALL                                         $25     
         18        ASSIGN                                                   !7, $25
   15    19        IS_SMALLER                                       ~27     0, !7
         20      > JMPZ_EX                                          ~27     ~27, ->28
         21    >   INIT_FCALL                                               'mb_substr'
         22        SEND_VAR                                                 !6
         23        SEND_VAL                                                 0
         24        SEND_VAL                                                 2
         25        DO_ICALL                                         $28     
         26        IS_EQUAL                                         ~29     $28, '%2F%2F'
         27        BOOL                                             ~27     ~29
         28    > > JMPZ                                                     ~27, ->34
   17    29    >   INIT_FCALL                                               'mb_substr'
         30        SEND_VAR                                                 !6
         31        SEND_VAL                                                 2
         32        DO_ICALL                                         $30     
         33        ASSIGN                                                   !6, $30
   20    34    >   IS_SMALLER                                       ~32     0, !7
         35      > JMPZ_EX                                          ~32     ~32, ->43
         36    >   INIT_FCALL                                               'mb_substr'
         37        SEND_VAR                                                 !6
         38        SEND_VAL                                                 0
         39        SEND_VAL                                                 1
         40        DO_ICALL                                         $33     
         41        IS_EQUAL                                         ~34     $33, '%2F'
         42        BOOL                                             ~32     ~34
         43    > > JMPZ                                                     ~32, ->49
   22    44    >   INIT_FCALL                                               'mb_substr'
         45        SEND_VAR                                                 !6
         46        SEND_VAL                                                 1
         47        DO_ICALL                                         $35     
         48        ASSIGN                                                   !6, $35
   25    49    >   CONCAT                                           ~37     'admin%2F', !6
         50        ASSIGN                                                   !6, ~37
   26    51        ASSIGN_DIM                                               !0
         52        OP_DATA                                                  !6
   29    53        INIT_FCALL                                               'mb_split'
         54        SEND_VAL                                                 '%2F'
         55        SEND_VAR                                                 !6
         56        DO_ICALL                                         $40     
         57        ASSIGN                                                   !8, $40
   30    58        FETCH_DIM_R                                      ~42     !8, 0
         59        ASSIGN                                                   !9, ~42
   32    60        CONCAT                                           ~44     !1, '%7C'
         61        CONCAT                                           ~45     ~44, !2
         62        CONCAT                                           ~46     ~45, '%7C'
         63        CONCAT                                           ~47     ~46, !9
         64        CONCAT                                           ~48     ~47, '%7C'
         65        CONCAT                                           ~49     ~48, !4
         66        CONCAT                                           ~50     ~49, '%7C'
         67        CONCAT                                           ~51     ~50, !3
         68        ASSIGN                                                   !10, ~51
   33    69        IS_EQUAL                                                 !4, 'rename'
         70      > JMPZ                                                     ~53, ->76
   34    71    >   CONCAT                                           ~54     '%7C', !11
         72        CONCAT                                           ~55     ~54, '%7C'
         73        CONCAT                                           ~56     ~55, !12
         74        ASSIGN_OP                                     8          !10, ~56
         75      > JMP                                                      ->106
   37    76    >   INIT_FCALL                                               'mb_strlen'
         77        SEND_VAR                                                 !9
         78        DO_ICALL                                         $58     
         79        ASSIGN                                                   !7, $58
   38    80        INIT_FCALL                                               'mb_substr'
         81        SEND_VAR                                                 !6
         82        SEND_VAR                                                 !7
         83        DO_ICALL                                         $60     
         84        ASSIGN                                                   !13, $60
   39    85        INIT_FCALL                                               'mb_strlen'
         86        SEND_VAR                                                 !13
         87        DO_ICALL                                         $62     
         88        ASSIGN                                                   !7, $62
   40    89        IS_SMALLER                                       ~64     0, !7
         90      > JMPZ_EX                                          ~64     ~64, ->98
         91    >   INIT_FCALL                                               'mb_substr'
         92        SEND_VAR                                                 !13
         93        SEND_VAL                                                 0
         94        SEND_VAL                                                 1
         95        DO_ICALL                                         $65     
         96        IS_EQUAL                                         ~66     $65, '%2F'
         97        BOOL                                             ~64     ~66
         98    > > JMPZ                                                     ~64, ->104
   42    99    >   INIT_FCALL                                               'mb_substr'
        100        SEND_VAR                                                 !13
        101        SEND_VAL                                                 1
        102        DO_ICALL                                         $67     
        103        ASSIGN                                                   !13, $67
   44   104    >   CONCAT                                           ~69     '%7C', !13
        105        ASSIGN_OP                                     8          !10, ~69
   47   106    >   ASSIGN_DIM                                               !0
        107        OP_DATA                                                  !10
   48   108        INIT_FCALL                                               'print_r'
        109        SEND_VAR                                                 !0
        110        DO_ICALL                                                 
        111      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.57 ms | 1404 KiB | 21 Q