3v4l.org

run code in 500+ PHP versions simultaneously
<?php $lines = array( // INCLUDE: No closing tag. 'INCLUDE' => '<esi:include src="http://example.com/1.html" alt="http://bak.example.com/2.html"/>', 'INLINE opening' => '<esi:inline name="URI" fetchable="{yes | no}">', 'INLINE closing' => '</esi:inline>', 'CHOOSE opening' => '<esi:choose>', 'CHOOSE closing' => '</esi:choose>', 'WHEN opening' => '<esi:when test="...">', 'WHEN closing' => '</esi:when>', 'OTHERWISE opening' => '<esi:otherwise>', 'OTHERWISE closing' => '</esi:otherwise>', 'TRY opening' => '<esi:try>', 'TRY closing' => '</esi:try>', 'ATTEMPT opening' => '<esi:attempt>', 'ATTEMPT closing' => '</esi:attempt>', 'EXCEPT opening' => '<esi:except>', 'EXCEPT closing' => '</esi:except>', 'COMMENT' => '<esi:comment text="the following animation will have a 24 hr TTL." />', 'REMOVE opening' => '<esi:remove>', 'REMOVE closing' => '</esi:remove>', 'VARS opening' => '<esi:vars>', 'VARS closing' => '</esi:vars>', ); foreach ( $lines as $type => $line ) { preg_match( '%^<\s*(/\s*)?((?:esi:)?[a-zA-Z0-9-]+)([^>]*)>?$%', $line, $matches ); $slash = trim( $matches[1] ); $elem = $matches[2]; $attrlist = $matches[3]; echo "$type:\n"; echo "Original: '$line'\n"; echo "Slash: '$slash'\n"; echo "Elem: '$elem'\n"; echo "Attr List: '$attrlist'\n"; echo "\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 37
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 37
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 37
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 37
filename:       /in/2EqHW
function name:  (null)
number of ops:  39
compiled vars:  !0 = $lines, !1 = $line, !2 = $type, !3 = $matches, !4 = $slash, !5 = $elem, !6 = $attrlist
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   28     1      > FE_RESET_R                                           $8      !0, ->37
          2    > > FE_FETCH_R                                           ~9      $8, !1, ->37
          3    >   ASSIGN                                                       !2, ~9
   29     4        INIT_FCALL                                                   'preg_match'
          5        SEND_VAL                                                     '%25%5E%3C%5Cs%2A%28%2F%5Cs%2A%29%3F%28%28%3F%3Aesi%3A%29%3F%5Ba-zA-Z0-9-%5D%2B%29%28%5B%5E%3E%5D%2A%29%3E%3F%24%25'
          6        SEND_VAR                                                     !1
          7        SEND_REF                                                     !3
          8        DO_ICALL                                                     
   31     9        FETCH_DIM_R                                          ~12     !3, 1
         10        FRAMELESS_ICALL_1                trim                ~13     ~12
         11        ASSIGN                                                       !4, ~13
   32    12        FETCH_DIM_R                                          ~15     !3, 2
         13        ASSIGN                                                       !5, ~15
   33    14        FETCH_DIM_R                                          ~17     !3, 3
         15        ASSIGN                                                       !6, ~17
   35    16        NOP                                                          
         17        FAST_CONCAT                                          ~19     !2, '%3A%0A'
         18        ECHO                                                         ~19
   36    19        ROPE_INIT                                         3  ~21     'Original%3A++%27'
         20        ROPE_ADD                                          1  ~21     ~21, !1
         21        ROPE_END                                          2  ~20     ~21, '%27%0A'
         22        ECHO                                                         ~20
   37    23        ROPE_INIT                                         3  ~24     'Slash%3A+++++%27'
         24        ROPE_ADD                                          1  ~24     ~24, !4
         25        ROPE_END                                          2  ~23     ~24, '%27%0A'
         26        ECHO                                                         ~23
   38    27        ROPE_INIT                                         3  ~27     'Elem%3A++++++%27'
         28        ROPE_ADD                                          1  ~27     ~27, !5
         29        ROPE_END                                          2  ~26     ~27, '%27%0A'
         30        ECHO                                                         ~26
   39    31        ROPE_INIT                                         3  ~30     'Attr+List%3A+%27'
         32        ROPE_ADD                                          1  ~30     ~30, !6
         33        ROPE_END                                          2  ~29     ~30, '%27%0A'
         34        ECHO                                                         ~29
   40    35        ECHO                                                         '%0A'
   28    36      > JMP                                                          ->2
         37    >   FE_FREE                                                      $8
   41    38      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
185.93 ms | 4612 KiB | 14 Q