3v4l.org

run code in 300+ PHP versions simultaneously
<?php $re = '`\[(msg|uri) "(.*?)"\]`mi'; $str = '[Wed Feb 06 08:57:54 2019] [error] [client 123.123.123.123] ModSecurity: Access denied with code 403 (phase 2). Operator EQ matched 0 at REQUEST_HEADERS. [file "/etc/httpd/modsecurity.d/activated_rules/modsecurity_crs_21_protocol_anomalies.conf"] [line "47"] [id "960015"] [rev "1"] [msg "Request Missing an Accept Header"] [severity "NOTICE"] [ver "OWASP_CRS/2.2.6"] [maturity "9"] [accuracy "9"] [tag "OWASP_CRS/PROTOCOL_VIOLATION/MISSING_HEADER_ACCEPT"] [tag "WASCTC/WASC-21"] [tag "OWASP_TOP_10/A7"] [tag "PCI/6.5.10"] [hostname "something.net"] [uri "/index.php/admin/"] [unique_id "XFsEAsDzZbMAAGY5i5oAAAAA"]'; preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0); // Print the entire match result print_r($matches); foreach($matches as $match){ $expected[] = $match[2]; } print_r($expected); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 13, Position 2 = 18
Branch analysis from position: 13
2 jumps found. (Code = 78) Position 1 = 14, Position 2 = 18
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/HJ2uB
function name:  (null)
number of ops:  23
compiled vars:  !0 = $re, !1 = $str, !2 = $matches, !3 = $match, !4 = $expected
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%60%5C%5B%28msg%7Curi%29+%22%28.%2A%3F%29%22%5C%5D%60mi'
    3     1        ASSIGN                                                   !1, '%5BWed+Feb+06+08%3A57%3A54+2019%5D+%5Berror%5D+%5Bclient+123.123.123.123%5D+ModSecurity%3A+Access+denied+with+code+403+%28phase+2%29.+Operator+EQ+matched+0+at+REQUEST_HEADERS.+%5Bfile+%22%2Fetc%2Fhttpd%2Fmodsecurity.d%2Factivated_rules%2Fmodsecurity_crs_21_protocol_anomalies.conf%22%5D+%5Bline+%2247%22%5D+%5Bid+%22960015%22%5D+%5Brev+%221%22%5D+%5Bmsg+%22Request+Missing+an+Accept+Header%22%5D+%5Bseverity+%22NOTICE%22%5D+%5Bver+%22OWASP_CRS%2F2.2.6%22%5D+%5Bmaturity+%229%22%5D+%5Baccuracy+%229%22%5D+%5Btag+%22OWASP_CRS%2FPROTOCOL_VIOLATION%2FMISSING_HEADER_ACCEPT%22%5D+%5Btag+%22WASCTC%2FWASC-21%22%5D+%5Btag+%22OWASP_TOP_10%2FA7%22%5D+%5Btag+%22PCI%2F6.5.10%22%5D+%5Bhostname+%22something.net%22%5D+%5Buri+%22%2Findex.php%2Fadmin%2F%22%5D+%5Bunique_id+%22XFsEAsDzZbMAAGY5i5oAAAAA%22%5D'
    5     2        INIT_FCALL                                               'preg_match_all'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        SEND_REF                                                 !2
          6        SEND_VAL                                                 2
          7        SEND_VAL                                                 0
          8        DO_ICALL                                                 
   11     9        INIT_FCALL                                               'print_r'
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                                 
   12    12      > FE_RESET_R                                       $9      !2, ->18
         13    > > FE_FETCH_R                                               $9, !3, ->18
   13    14    >   FETCH_DIM_R                                      ~11     !3, 2
         15        ASSIGN_DIM                                               !4
         16        OP_DATA                                                  ~11
   12    17      > JMP                                                      ->13
         18    >   FE_FREE                                                  $9
   15    19        INIT_FCALL                                               'print_r'
         20        SEND_VAR                                                 !4
         21        DO_ICALL                                                 
   16    22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.86 ms | 1002 KiB | 15 Q