3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pattern = '/(?P<hostname>[\w\.]+) ' . '(?P<forwardedFor>(?:[\d\.]+, )*(?:[\d\.]+)|-) ' . '(?P<remoteHostname>[\d\.]+) ' . '(?P<remoteLogname>[^\s]+) ' . '(?P<remoteUsername>[^\s]+) ' . '\[' . '(?P<requestDate>[^\]]+)' . '\] ' . '"' . '(?P<method>\w+) ' . '(?P<uri>[^\s]+) ' . '(?<httpVersion>[^\"]+)' . '" ' . '(?P<responseStatus>\d+) ' . '(?P<responseSize>\d+)/'; $test = 'my.server.com 24.24.24.3, 1.2.3.4 1.2.3.5 - - [18/May/2016:02:57:25 -0400] "GET /veer/eye?params=1&are=2&right=3&here=4 HTTP/1.1" 200 146351'; $test2 = 'qa-test.test.com - 80.82.65.120 - - [18/May/2016:00:30:20 -0400] "GET // HTTP/1.1" 404 198'; preg_match($pattern, $test, $matches); print_r($matches); preg_match($pattern, $test2, $matches); print_r($matches);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jMKFL
function name:  (null)
number of ops:  20
compiled vars:  !0 = $pattern, !1 = $test, !2 = $test2, !3 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%2F%28%3FP%3Chostname%3E%5B%5Cw%5C.%5D%2B%29+%28%3FP%3CforwardedFor%3E%28%3F%3A%5B%5Cd%5C.%5D%2B%2C+%29%2A%28%3F%3A%5B%5Cd%5C.%5D%2B%29%7C-%29+%28%3FP%3CremoteHostname%3E%5B%5Cd%5C.%5D%2B%29+%28%3FP%3CremoteLogname%3E%5B%5E%5Cs%5D%2B%29+%28%3FP%3CremoteUsername%3E%5B%5E%5Cs%5D%2B%29+%5C%5B%28%3FP%3CrequestDate%3E%5B%5E%5C%5D%5D%2B%29%5C%5D+%22%28%3FP%3Cmethod%3E%5Cw%2B%29+%28%3FP%3Curi%3E%5B%5E%5Cs%5D%2B%29+%28%3F%3ChttpVersion%3E%5B%5E%5C%22%5D%2B%29%22+%28%3FP%3CresponseStatus%3E%5Cd%2B%29+%28%3FP%3CresponseSize%3E%5Cd%2B%29%2F'
   18     1        ASSIGN                                                   !1, 'my.server.com+24.24.24.3%2C+1.2.3.4+1.2.3.5+-+-+%5B18%2FMay%2F2016%3A02%3A57%3A25+-0400%5D+%22GET+%2Fveer%2Feye%3Fparams%3D1%26are%3D2%26right%3D3%26here%3D4+HTTP%2F1.1%22+200+146351'
   19     2        ASSIGN                                                   !2, 'qa-test.test.com+-+80.82.65.120+-+-+%5B18%2FMay%2F2016%3A00%3A30%3A20+-0400%5D+%22GET+%2F%2F+HTTP%2F1.1%22+404+198'
   21     3        INIT_FCALL                                               'preg_match'
          4        SEND_VAR                                                 !0
          5        SEND_VAR                                                 !1
          6        SEND_REF                                                 !3
          7        DO_ICALL                                                 
   22     8        INIT_FCALL                                               'print_r'
          9        SEND_VAR                                                 !3
         10        DO_ICALL                                                 
   24    11        INIT_FCALL                                               'preg_match'
         12        SEND_VAR                                                 !0
         13        SEND_VAR                                                 !2
         14        SEND_REF                                                 !3
         15        DO_ICALL                                                 
   25    16        INIT_FCALL                                               'print_r'
         17        SEND_VAR                                                 !3
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.69 ms | 1001 KiB | 15 Q