3v4l.org

run code in 300+ PHP versions simultaneously
<?php $vhost =' <Directory "/srv/httpd/htdocs/mydomain.com"> Options Indexes FollowSymLinks AllowOverride All Order deny,allow Allow from 127.0.0.1 Allow from xxx.xxx.xxx.xxx Allow from xxx.xxx.xxx.xxx Deny from all </Directory> <Directory "/srv/httpd/htdocs/myseconddomain"> Options Indexes FollowSymLinks AllowOverride All Order deny,allow Allow from 127.0.0.1 Allow from xxx.xxx.xxx.xxx Allow from xxx.xxx.xxx.xxx Deny from all </Directory> '; $matches = []; $directory = preg_match_all('/<Directory "(.*")>([\s\S]*?)<\/Directory>/', $vhost, $matches, PREG_SET_ORDER); foreach ($matches as $match) { echo "Directory: " . $match[1] . "\n"; } //var_dump($matches);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 16
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 16
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/uP5ll
function name:  (null)
number of ops:  18
compiled vars:  !0 = $vhost, !1 = $matches, !2 = $directory, !3 = $match
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%0A%3CDirectory+%22%2Fsrv%2Fhttpd%2Fhtdocs%2Fmydomain.com%22%3E%0A++++Options+Indexes+FollowSymLinks%0A++++AllowOverride+All%0A++++Order+deny%2Callow%0A++++Allow+from+127.0.0.1%0A++++Allow+from+xxx.xxx.xxx.xxx%0A++++Allow+from+xxx.xxx.xxx.xxx%0A++++Deny+from+all%0A%3C%2FDirectory%3E%0A%3CDirectory+%22%2Fsrv%2Fhttpd%2Fhtdocs%2Fmyseconddomain%22%3E%0A++++Options+Indexes+FollowSymLinks%0A++++AllowOverride+All%0A++++Order+deny%2Callow%0A++++Allow+from+127.0.0.1%0A++++Allow+from+xxx.xxx.xxx.xxx%0A++++Allow+from+xxx.xxx.xxx.xxx%0A++++Deny+from+all%0A%3C%2FDirectory%3E%0A%0A'
   25     1        ASSIGN                                                   !1, <array>
   26     2        INIT_FCALL                                               'preg_match_all'
          3        SEND_VAL                                                 '%2F%3CDirectory+%22%28.%2A%22%29%3E%28%5B%5Cs%5CS%5D%2A%3F%29%3C%5C%2FDirectory%3E%2F'
          4        SEND_VAR                                                 !0
          5        SEND_REF                                                 !1
          6        SEND_VAL                                                 2
          7        DO_ICALL                                         $6      
          8        ASSIGN                                                   !2, $6
   28     9      > FE_RESET_R                                       $8      !1, ->16
         10    > > FE_FETCH_R                                               $8, !3, ->16
   29    11    >   FETCH_DIM_R                                      ~9      !3, 1
         12        CONCAT                                           ~10     'Directory%3A+', ~9
         13        CONCAT                                           ~11     ~10, '%0A'
         14        ECHO                                                     ~11
   28    15      > JMP                                                      ->10
         16    >   FE_FREE                                                  $8
   32    17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.6 ms | 1395 KiB | 15 Q