3v4l.org

run code in 300+ 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 = 39
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 39
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 39
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 39
filename:       /in/2EqHW
function name:  (null)
number of ops:  41
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, ->39
          2    > > FE_FETCH_R                                       ~9      $8, !1, ->39
          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        INIT_FCALL                                               'trim'
         10        FETCH_DIM_R                                      ~12     !3, 1
         11        SEND_VAL                                                 ~12
         12        DO_ICALL                                         $13     
         13        ASSIGN                                                   !4, $13
   32    14        FETCH_DIM_R                                      ~15     !3, 2
         15        ASSIGN                                                   !5, ~15
   33    16        FETCH_DIM_R                                      ~17     !3, 3
         17        ASSIGN                                                   !6, ~17
   35    18        NOP                                                      
         19        FAST_CONCAT                                      ~19     !2, '%3A%0A'
         20        ECHO                                                     ~19
   36    21        ROPE_INIT                                     3  ~21     'Original%3A++%27'
         22        ROPE_ADD                                      1  ~21     ~21, !1
         23        ROPE_END                                      2  ~20     ~21, '%27%0A'
         24        ECHO                                                     ~20
   37    25        ROPE_INIT                                     3  ~24     'Slash%3A+++++%27'
         26        ROPE_ADD                                      1  ~24     ~24, !4
         27        ROPE_END                                      2  ~23     ~24, '%27%0A'
         28        ECHO                                                     ~23
   38    29        ROPE_INIT                                     3  ~27     'Elem%3A++++++%27'
         30        ROPE_ADD                                      1  ~27     ~27, !5
         31        ROPE_END                                      2  ~26     ~27, '%27%0A'
         32        ECHO                                                     ~26
   39    33        ROPE_INIT                                     3  ~30     'Attr+List%3A+%27'
         34        ROPE_ADD                                      1  ~30     ~30, !6
         35        ROPE_END                                      2  ~29     ~30, '%27%0A'
         36        ECHO                                                     ~29
   40    37        ECHO                                                     '%0A'
   28    38      > JMP                                                      ->2
         39    >   FE_FREE                                                  $8
   41    40      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.81 ms | 1465 KiB | 15 Q