3v4l.org

run code in 300+ PHP versions simultaneously
<?php $regex = '/s+'; $vhost = ' DocumentRoot /www/example2 ServerName www.example.org ErrorLog /var/log/log.txt <Directory> ErrorLog /var/log/log.txt </Directory> <Directory /> ErrorLog /var/log/log.txt </Directory>'; var_dump(preg_split($regex, $vhost)); //var_dump($matches); $vhostRegEx = '/<VirtualHost (\d{1,3}\.\d{1,3}.\d{1,3}.\d{1,3}):(\d+)>([\s\S]+)<\/VirtualHost>/'; $matches = []; if (!preg_match($vhostRegEx, $vHost, $matches)) { throw new \Exception("No VHost Found"); } var_dump($matches);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 22
Branch analysis from position: 18
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BZU90
function name:  (null)
number of ops:  26
compiled vars:  !0 = $regex, !1 = $vhost, !2 = $vhostRegEx, !3 = $matches, !4 = $vHost
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%2Fs%2B'
    5     1        ASSIGN                                                   !1, '%0ADocumentRoot+%2Fwww%2Fexample2%0AServerName+www.example.org%0AErrorLog+%2Fvar%2Flog%2Flog.txt%0A%09%0A%09%3CDirectory%3E%0A%09%09ErrorLog+%2Fvar%2Flog%2Flog.txt%0A%09%3C%2FDirectory%3E%0A%09%0A%09%3CDirectory+%2F%3E%0A%09%09ErrorLog+%2Fvar%2Flog%2Flog.txt%0A%09%3C%2FDirectory%3E'
   19     2        INIT_FCALL                                               'var_dump'
          3        INIT_FCALL                                               'preg_split'
          4        SEND_VAR                                                 !0
          5        SEND_VAR                                                 !1
          6        DO_ICALL                                         $7      
          7        SEND_VAR                                                 $7
          8        DO_ICALL                                                 
   25     9        ASSIGN                                                   !2, '%2F%3CVirtualHost+%28%5Cd%7B1%2C3%7D%5C.%5Cd%7B1%2C3%7D.%5Cd%7B1%2C3%7D.%5Cd%7B1%2C3%7D%29%3A%28%5Cd%2B%29%3E%28%5B%5Cs%5CS%5D%2B%29%3C%5C%2FVirtualHost%3E%2F'
   26    10        ASSIGN                                                   !3, <array>
   28    11        INIT_FCALL                                               'preg_match'
         12        SEND_VAR                                                 !2
         13        SEND_VAR                                                 !4
         14        SEND_REF                                                 !3
         15        DO_ICALL                                         $11     
         16        BOOL_NOT                                         ~12     $11
         17      > JMPZ                                                     ~12, ->22
   29    18    >   NEW                                              $13     'Exception'
         19        SEND_VAL_EX                                              'No+VHost+Found'
         20        DO_FCALL                                      0          
         21      > THROW                                         0          $13
   32    22    >   INIT_FCALL                                               'var_dump'
         23        SEND_VAR                                                 !3
         24        DO_ICALL                                                 
         25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.08 ms | 1388 KiB | 19 Q