3v4l.org

run code in 300+ PHP versions simultaneously
<?php $regex = '/\s+/'; $vhost = 'DocumentRoot /www/example2'; 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/c16eE
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, '%2F%5Cs%2B%2F'
    5     1        ASSIGN                                                   !1, 'DocumentRoot+%2Fwww%2Fexample2'
    8     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                                                 
   14     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'
   15    10        ASSIGN                                                   !3, <array>
   17    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
   18    18    >   NEW                                              $13     'Exception'
         19        SEND_VAL_EX                                              'No+VHost+Found'
         20        DO_FCALL                                      0          
         21      > THROW                                         0          $13
   21    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:
145.17 ms | 1395 KiB | 19 Q