3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.9 ms | 1404 KiB | 21 Q