3v4l.org

run code in 300+ PHP versions simultaneously
<?php function shortcode_parse_atts($text) { $atts = array(); $pattern = get_shortcode_atts_regex(); $text = preg_replace("/[\x{00a0}\x{200b}]+/u", " ", $text); if ( preg_match_all($pattern, $text, $match, PREG_SET_ORDER) ) { foreach ($match as $m) { if (!empty($m[1])) $atts[strtolower($m[1])] = stripcslashes($m[2]); elseif (!empty($m[3])) $atts[strtolower($m[3])] = stripcslashes($m[4]); elseif (!empty($m[5])) $atts[strtolower($m[5])] = stripcslashes($m[6]); elseif (isset($m[7]) && strlen($m[7])) $atts[] = stripcslashes($m[7]); elseif (isset($m[8])) $atts[] = stripcslashes($m[8]); } // Reject any unclosed HTML elements foreach( $atts as &$value ) { if ( false !== strpos( $value, '<' ) ) { if ( 1 !== preg_match( '/^[^<]*+(?:<[^>]*+>[^<]*+)*+$/', $value ) ) { $value = ''; } } } } else { $atts = ltrim($text); } return $atts; } var_dump(shortcode_parse_atts(':http://localhost:8888/lusa/audio/1310seg02.mp3'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0rY1W
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   34     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'shortcode_parse_atts'
          2        SEND_VAL                                                 '%3Ahttp%3A%2F%2Flocalhost%3A8888%2Flusa%2Faudio%2F1310seg02.mp3'
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
          6      > RETURN                                                   1

Function shortcode_parse_atts:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 103
Branch analysis from position: 18
2 jumps found. (Code = 77) Position 1 = 19, Position 2 = 84
Branch analysis from position: 19
2 jumps found. (Code = 78) Position 1 = 20, Position 2 = 84
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 34
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 83
Branch analysis from position: 83
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
Branch analysis from position: 34
2 jumps found. (Code = 43) Position 1 = 37, Position 2 = 48
Branch analysis from position: 37
1 jumps found. (Code = 42) Position 1 = 83
Branch analysis from position: 83
Branch analysis from position: 48
2 jumps found. (Code = 43) Position 1 = 51, Position 2 = 62
Branch analysis from position: 51
1 jumps found. (Code = 42) Position 1 = 83
Branch analysis from position: 83
Branch analysis from position: 62
2 jumps found. (Code = 46) Position 1 = 64, Position 2 = 67
Branch analysis from position: 64
2 jumps found. (Code = 43) Position 1 = 68, Position 2 = 75
Branch analysis from position: 68
1 jumps found. (Code = 42) Position 1 = 83
Branch analysis from position: 83
Branch analysis from position: 75
2 jumps found. (Code = 43) Position 1 = 77, Position 2 = 83
Branch analysis from position: 77
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
Branch analysis from position: 83
Branch analysis from position: 67
Branch analysis from position: 84
2 jumps found. (Code = 125) Position 1 = 86, Position 2 = 101
Branch analysis from position: 86
2 jumps found. (Code = 126) Position 1 = 87, Position 2 = 101
Branch analysis from position: 87
2 jumps found. (Code = 43) Position 1 = 93, Position 2 = 100
Branch analysis from position: 93
2 jumps found. (Code = 43) Position 1 = 99, Position 2 = 100
Branch analysis from position: 99
1 jumps found. (Code = 42) Position 1 = 86
Branch analysis from position: 86
Branch analysis from position: 100
Branch analysis from position: 100
Branch analysis from position: 101
1 jumps found. (Code = 42) Position 1 = 107
Branch analysis from position: 107
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 101
Branch analysis from position: 84
Branch analysis from position: 103
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0rY1W
function name:  shortcode_parse_atts
number of ops:  109
compiled vars:  !0 = $text, !1 = $atts, !2 = $pattern, !3 = $match, !4 = $m, !5 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        ASSIGN                                                   !1, <array>
    4     2        INIT_FCALL_BY_NAME                                       'get_shortcode_atts_regex'
          3        DO_FCALL                                      0  $7      
          4        ASSIGN                                                   !2, $7
    5     5        INIT_FCALL                                               'preg_replace'
          6        SEND_VAL                                                 '%2F%5B%5Cx%7B00a0%7D%5Cx%7B200b%7D%5D%2B%2Fu'
          7        SEND_VAL                                                 '+'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $9      
         10        ASSIGN                                                   !0, $9
    6    11        INIT_FCALL                                               'preg_match_all'
         12        SEND_VAR                                                 !2
         13        SEND_VAR                                                 !0
         14        SEND_REF                                                 !3
         15        SEND_VAL                                                 2
         16        DO_ICALL                                         $11     
         17      > JMPZ                                                     $11, ->103
    7    18    > > FE_RESET_R                                       $12     !3, ->84
         19    > > FE_FETCH_R                                               $12, !4, ->84
    8    20    >   ISSET_ISEMPTY_DIM_OBJ                         1  ~13     !4, 1
         21        BOOL_NOT                                         ~14     ~13
         22      > JMPZ                                                     ~14, ->34
    9    23    >   INIT_FCALL                                               'strtolower'
         24        FETCH_DIM_R                                      ~15     !4, 1
         25        SEND_VAL                                                 ~15
         26        DO_ICALL                                         $16     
         27        INIT_FCALL                                               'stripcslashes'
         28        FETCH_DIM_R                                      ~18     !4, 2
         29        SEND_VAL                                                 ~18
         30        DO_ICALL                                         $19     
         31        ASSIGN_DIM                                               !1, $16
         32        OP_DATA                                                  $19
         33      > JMP                                                      ->83
   10    34    >   ISSET_ISEMPTY_DIM_OBJ                         1  ~20     !4, 3
         35        BOOL_NOT                                         ~21     ~20
         36      > JMPZ                                                     ~21, ->48
   11    37    >   INIT_FCALL                                               'strtolower'
         38        FETCH_DIM_R                                      ~22     !4, 3
         39        SEND_VAL                                                 ~22
         40        DO_ICALL                                         $23     
         41        INIT_FCALL                                               'stripcslashes'
         42        FETCH_DIM_R                                      ~25     !4, 4
         43        SEND_VAL                                                 ~25
         44        DO_ICALL                                         $26     
         45        ASSIGN_DIM                                               !1, $23
         46        OP_DATA                                                  $26
         47      > JMP                                                      ->83
   12    48    >   ISSET_ISEMPTY_DIM_OBJ                         1  ~27     !4, 5
         49        BOOL_NOT                                         ~28     ~27
         50      > JMPZ                                                     ~28, ->62
   13    51    >   INIT_FCALL                                               'strtolower'
         52        FETCH_DIM_R                                      ~29     !4, 5
         53        SEND_VAL                                                 ~29
         54        DO_ICALL                                         $30     
         55        INIT_FCALL                                               'stripcslashes'
         56        FETCH_DIM_R                                      ~32     !4, 6
         57        SEND_VAL                                                 ~32
         58        DO_ICALL                                         $33     
         59        ASSIGN_DIM                                               !1, $30
         60        OP_DATA                                                  $33
         61      > JMP                                                      ->83
   14    62    >   ISSET_ISEMPTY_DIM_OBJ                         0  ~34     !4, 7
         63      > JMPZ_EX                                          ~34     ~34, ->67
         64    >   FETCH_DIM_R                                      ~35     !4, 7
         65        STRLEN                                           ~36     ~35
         66        BOOL                                             ~34     ~36
         67    > > JMPZ                                                     ~34, ->75
   15    68    >   INIT_FCALL                                               'stripcslashes'
         69        FETCH_DIM_R                                      ~38     !4, 7
         70        SEND_VAL                                                 ~38
         71        DO_ICALL                                         $39     
         72        ASSIGN_DIM                                               !1
         73        OP_DATA                                                  $39
         74      > JMP                                                      ->83
   16    75    >   ISSET_ISEMPTY_DIM_OBJ                         0          !4, 8
         76      > JMPZ                                                     ~40, ->83
   17    77    >   INIT_FCALL                                               'stripcslashes'
         78        FETCH_DIM_R                                      ~42     !4, 8
         79        SEND_VAL                                                 ~42
         80        DO_ICALL                                         $43     
         81        ASSIGN_DIM                                               !1
         82        OP_DATA                                                  $43
    7    83    > > JMP                                                      ->19
         84    >   FE_FREE                                                  $12
   21    85      > FE_RESET_RW                                      $44     !1, ->101
         86    > > FE_FETCH_RW                                              $44, !5, ->101
   22    87    >   INIT_FCALL                                               'strpos'
         88        SEND_VAR                                                 !5
         89        SEND_VAL                                                 '%3C'
         90        DO_ICALL                                         $45     
         91        TYPE_CHECK                                  1018          $45
         92      > JMPZ                                                     ~46, ->100
   23    93    >   INIT_FCALL                                               'preg_match'
         94        SEND_VAL                                                 '%2F%5E%5B%5E%3C%5D%2A%2B%28%3F%3A%3C%5B%5E%3E%5D%2A%2B%3E%5B%5E%3C%5D%2A%2B%29%2A%2B%24%2F'
         95        SEND_VAR                                                 !5
         96        DO_ICALL                                         $47     
         97        IS_NOT_IDENTICAL                                         $47, 1
         98      > JMPZ                                                     ~48, ->100
   24    99    >   ASSIGN                                                   !5, ''
   21   100    > > JMP                                                      ->86
        101    >   FE_FREE                                                  $44
        102      > JMP                                                      ->107
   29   103    >   INIT_FCALL                                               'ltrim'
        104        SEND_VAR                                                 !0
        105        DO_ICALL                                         $50     
        106        ASSIGN                                                   !1, $50
   31   107    > > RETURN                                                   !1
   32   108*     > RETURN                                                   null

End of function shortcode_parse_atts

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.41 ms | 1415 KiB | 30 Q