3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "Business Rule X0000-005 - The XML data has failed schema validation. cvc-maxInclusive-valid. Value '3144' is not facet-valid with respect to maxInclusive '2500' for type '#AnonType_StudentLoanInterestDedAmtIRS1040Type'. Field/Xpath:/efile:Return[1]/efile:ReturnData[1]/efile:IRS1040[1]/efile:StudentLoanInterestDedAmt["; $nonxmlbusrules_short = '/(?:Rule[\s])([a-zA-Z][0-9a-zA-Z]*[\-][0-9a-zA-Z]*)/'; $allbusrules = '/((?:Rule[\s])([a-zA-Z]{3}|[a-zA-z]{2}[0-9]{1})*[\-][0-9]*([-0-9]*)?)/'; $xmlbusrules = '/(X0000-005)/'; $nonxmlbusrules_long = '/(?:Rule[\s])([0-9a-zA-Z]*[\-][0-9a-zA-Z]*([\-][0-9a-zA-Z]*)?([-0-9]*)?)/'; $xpath_matcher = '/(?:Field\/Xpath:)[\s]*(.*)/'; // Match non-xml short business rules preg_match_all($nonxmlbusrules_short, $str, $matches[1]); $busRules_arr_short = $matches; // Match all business rules according to the pattern preg_match_all($allbusrules, $str, $matches[1]); $busRules_arr = $matches; // Match xml business rules and merge them into the all-rules preg_match_all($xmlbusrules, $str, $matches); $busRules_arr=array_merge($busRules_arr,$matches[1]); // Match non-XML long business rules and merge them into the all-rules preg_match_all($nonxmlbusrules_long, $str, $matches); $busRules_arr = array_merge($busRules_arr,$matches[1]); preg_match_all($xpath_matcher, $str, $matches); $xPath_arr = $matches[1]; $xPath_arr = preg_replace("(\[.*?\])", '', $xPath_arr); $xPath_arr = preg_replace("(\[*?)", '', $xPath_arr); foreach ($busRules_arr as $idx => $brule) { if (trim(strtolower($brule)) =='x0000-005') { echo "ITS AN XML RULE!"; }} print_r($busRules_arr[1]); print_r($xPath_arr);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 62, Position 2 = 74
Branch analysis from position: 62
2 jumps found. (Code = 78) Position 1 = 63, Position 2 = 74
Branch analysis from position: 63
2 jumps found. (Code = 43) Position 1 = 72, Position 2 = 73
Branch analysis from position: 72
1 jumps found. (Code = 42) Position 1 = 62
Branch analysis from position: 62
Branch analysis from position: 73
Branch analysis from position: 74
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 74
filename:       /in/sBlMH
function name:  (null)
number of ops:  83
compiled vars:  !0 = $str, !1 = $nonxmlbusrules_short, !2 = $allbusrules, !3 = $xmlbusrules, !4 = $nonxmlbusrules_long, !5 = $xpath_matcher, !6 = $matches, !7 = $busRules_arr_short, !8 = $busRules_arr, !9 = $xPath_arr, !10 = $brule, !11 = $idx
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'Business+Rule+X0000-005+-+The+XML+data+has+failed+schema+validation.+cvc-maxInclusive-valid.+Value+%273144%27+is+not+facet-valid+with+respect+to+maxInclusive+%272500%27+for+type+%27%23AnonType_StudentLoanInterestDedAmtIRS1040Type%27.++Field%2FXpath%3A%2Fefile%3AReturn%5B1%5D%2Fefile%3AReturnData%5B1%5D%2Fefile%3AIRS1040%5B1%5D%2Fefile%3AStudentLoanInterestDedAmt%5B'
    3     1        ASSIGN                                                   !1, '%2F%28%3F%3ARule%5B%5Cs%5D%29%28%5Ba-zA-Z%5D%5B0-9a-zA-Z%5D%2A%5B%5C-%5D%5B0-9a-zA-Z%5D%2A%29%2F'
    4     2        ASSIGN                                                   !2, '%2F%28%28%3F%3ARule%5B%5Cs%5D%29%28%5Ba-zA-Z%5D%7B3%7D%7C%5Ba-zA-z%5D%7B2%7D%5B0-9%5D%7B1%7D%29%2A%5B%5C-%5D%5B0-9%5D%2A%28%5B-0-9%5D%2A%29%3F%29%2F'
    5     3        ASSIGN                                                   !3, '%2F%28X0000-005%29%2F'
    6     4        ASSIGN                                                   !4, '%2F%28%3F%3ARule%5B%5Cs%5D%29%28%5B0-9a-zA-Z%5D%2A%5B%5C-%5D%5B0-9a-zA-Z%5D%2A%28%5B%5C-%5D%5B0-9a-zA-Z%5D%2A%29%3F%28%5B-0-9%5D%2A%29%3F%29%2F'
    7     5        ASSIGN                                                   !5, '%2F%28%3F%3AField%5C%2FXpath%3A%29%5B%5Cs%5D%2A%28.%2A%29%2F'
   10     6        INIT_FCALL                                               'preg_match_all'
          7        SEND_VAR                                                 !1
          8        SEND_VAR                                                 !0
          9        FETCH_DIM_W                                      $18     !6, 1
         10        SEND_REF                                                 $18
         11        DO_ICALL                                                 
   11    12        ASSIGN                                                   !7, !6
   14    13        INIT_FCALL                                               'preg_match_all'
         14        SEND_VAR                                                 !2
         15        SEND_VAR                                                 !0
         16        FETCH_DIM_W                                      $21     !6, 1
         17        SEND_REF                                                 $21
         18        DO_ICALL                                                 
   15    19        ASSIGN                                                   !8, !6
   18    20        INIT_FCALL                                               'preg_match_all'
         21        SEND_VAR                                                 !3
         22        SEND_VAR                                                 !0
         23        SEND_REF                                                 !6
         24        DO_ICALL                                                 
   19    25        INIT_FCALL                                               'array_merge'
         26        SEND_VAR                                                 !8
         27        FETCH_DIM_R                                      ~25     !6, 1
         28        SEND_VAL                                                 ~25
         29        DO_ICALL                                         $26     
         30        ASSIGN                                                   !8, $26
   22    31        INIT_FCALL                                               'preg_match_all'
         32        SEND_VAR                                                 !4
         33        SEND_VAR                                                 !0
         34        SEND_REF                                                 !6
         35        DO_ICALL                                                 
   23    36        INIT_FCALL                                               'array_merge'
         37        SEND_VAR                                                 !8
         38        FETCH_DIM_R                                      ~29     !6, 1
         39        SEND_VAL                                                 ~29
         40        DO_ICALL                                         $30     
         41        ASSIGN                                                   !8, $30
   26    42        INIT_FCALL                                               'preg_match_all'
         43        SEND_VAR                                                 !5
         44        SEND_VAR                                                 !0
         45        SEND_REF                                                 !6
         46        DO_ICALL                                                 
   27    47        FETCH_DIM_R                                      ~33     !6, 1
         48        ASSIGN                                                   !9, ~33
   28    49        INIT_FCALL                                               'preg_replace'
         50        SEND_VAL                                                 '%28%5C%5B.%2A%3F%5C%5D%29'
         51        SEND_VAL                                                 ''
         52        SEND_VAR                                                 !9
         53        DO_ICALL                                         $35     
         54        ASSIGN                                                   !9, $35
   29    55        INIT_FCALL                                               'preg_replace'
         56        SEND_VAL                                                 '%28%5C%5B%2A%3F%29'
         57        SEND_VAL                                                 ''
         58        SEND_VAR                                                 !9
         59        DO_ICALL                                         $37     
         60        ASSIGN                                                   !9, $37
   30    61      > FE_RESET_R                                       $39     !8, ->74
         62    > > FE_FETCH_R                                       ~40     $39, !10, ->74
         63    >   ASSIGN                                                   !11, ~40
   31    64        INIT_FCALL                                               'trim'
         65        INIT_FCALL                                               'strtolower'
         66        SEND_VAR                                                 !10
         67        DO_ICALL                                         $42     
         68        SEND_VAR                                                 $42
         69        DO_ICALL                                         $43     
         70        IS_EQUAL                                                 $43, 'x0000-005'
         71      > JMPZ                                                     ~44, ->73
   32    72    >   ECHO                                                     'ITS+AN+XML+RULE%21'
   30    73    > > JMP                                                      ->62
         74    >   FE_FREE                                                  $39
   36    75        INIT_FCALL                                               'print_r'
         76        FETCH_DIM_R                                      ~45     !8, 1
         77        SEND_VAL                                                 ~45
         78        DO_ICALL                                                 
   37    79        INIT_FCALL                                               'print_r'
         80        SEND_VAR                                                 !9
         81        DO_ICALL                                                 
         82      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.72 ms | 1025 KiB | 19 Q