3v4l.org

run code in 300+ PHP versions simultaneously
1<?php $str = '<Location "/wtf" "yo" \'hello\'> Allow from all </Location>'; preg_match('/(<[\S\s]+?>)([\S\s]+?)<\/[A-Za-z]+>/', $str, $matches); var_dump($matches); $res = trim($matches[1], "<>"); $content = $matches[2]; preg_match_all( '/"[^"\\\\]*(?:\\\\.[^"\\\\]*)*"|\'[^\'\\\\]*(?:\\\\.[^\'\\\\]*)*\'|\S+/', $res , $matches ); var_dump($matches);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PIPMX
function name:  (null)
number of ops:  27
compiled vars:  !0 = $str, !1 = $matches, !2 = $res, !3 = $content
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   ECHO                                                     '1'
    4     1        ASSIGN                                                   !0, '%3CLocation+%22%2Fwtf%22+%22yo%22+%27hello%27%3E%0A%09Allow+from+all%0A%3C%2FLocation%3E'
    8     2        INIT_FCALL                                               'preg_match'
          3        SEND_VAL                                                 '%2F%28%3C%5B%5CS%5Cs%5D%2B%3F%3E%29%28%5B%5CS%5Cs%5D%2B%3F%29%3C%5C%2F%5BA-Za-z%5D%2B%3E%2F'
          4        SEND_VAR                                                 !0
          5        SEND_REF                                                 !1
          6        DO_ICALL                                                 
   10     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                                 
   12    10        INIT_FCALL                                               'trim'
         11        FETCH_DIM_R                                      ~7      !1, 1
         12        SEND_VAL                                                 ~7
         13        SEND_VAL                                                 '%3C%3E'
         14        DO_ICALL                                         $8      
         15        ASSIGN                                                   !2, $8
   13    16        FETCH_DIM_R                                      ~10     !1, 2
         17        ASSIGN                                                   !3, ~10
   15    18        INIT_FCALL                                               'preg_match_all'
   16    19        SEND_VAL                                                 '%2F%22%5B%5E%22%5C%5C%5D%2A%28%3F%3A%5C%5C.%5B%5E%22%5C%5C%5D%2A%29%2A%22%7C%27%5B%5E%27%5C%5C%5D%2A%28%3F%3A%5C%5C.%5B%5E%27%5C%5C%5D%2A%29%2A%27%7C%5CS%2B%2F'
   17    20        SEND_VAR                                                 !2
   18    21        SEND_REF                                                 !1
         22        DO_ICALL                                                 
   21    23        INIT_FCALL                                               'var_dump'
         24        SEND_VAR                                                 !1
         25        DO_ICALL                                                 
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.85 ms | 1395 KiB | 21 Q