3v4l.org

run code in 300+ PHP versions simultaneously
<?php $txt = "resultCode:NoOp errorMessage:null processMessage:2014-08-08 02:18:01:659 INFO begin appName=ixp_app appVersion=2012_11_v01 integrationCode= clientId=999999 userName=autosuggest1 docId=12963337 docType=RFQ recipientId=58992 encodingTypeCode=UTF-8 2014-08-08 02:18:01:659 DEBUG Opening connection to the database 2014-08-08 02:18:01:660 DEBUG Validating client's account 2014-08-08 02:18:01:668 DEBUG Reading original document details from database 2014-08-08 02:18:01:668 DEBUG Reading Header from Database 2014-08-08 02:18:01:671 DEBUG Reading Line Items from Database 2014-08-08 02:18:01:673 DEBUG Reading Party Contacts from Database 2014-08-08 02:18:01:675 DEBUG Constructing Interchange 2014-08-08 02:18:01:675 DEBUG Constructing Request For Quote 2014-08-08 02:18:01:678 DEBUG Constructing Dates 2014-08-08 02:18:01:678 DEBUG Constructing References 2014-08-08 02:18:01:678 DEBUG Constructing Comments 2014-08-08 02:18:01:679 DEBUG Constructing Parties 2014-08-08 02:18:01:679 DEBUG Constructing Line Items 2014-08-08 02:18:01:680 DEBUG Saving original document content to file - raw 2014-08-08 02:18:01:705 INFO Found 1 possible RFQ matches with a Reference No.: 14/440 that was forwarded by Match Buyer 11107 to Supplier 58992 2014-08-08 02:18:01:705 INFO RFQ with Internal Ref No.: 12884046 2014-08-08 02:18:01:706 INFO RFQ 12963337 will now be compared with the list of possible RFQ matches 2014-08-08 02:18:01:706 INFO Comparing RFQ 12963337 with RFQ 12884046 2014-08-08 02:18:01:706 DEBUG Reading Header from Database 2014-08-08 02:18:01:708 DEBUG Reading Line Items from Database 2014-08-08 02:18:01:720 DEBUG Reading Party Contacts from Database 2014-08-08 02:18:01:727 DEBUG Constructing Interchange 2014-08-08 02:18:01:728 DEBUG Constructing Request For Quote 2014-08-08 02:18:01:730 DEBUG Constructing Dates 2014-08-08 02:18:01:730 DEBUG Constructing References 2014-08-08 02:18:01:731 DEBUG Constructing Comments 2014-08-08 02:18:01:731 DEBUG Constructing Parties 2014-08-08 02:18:01:732 DEBUG Constructing Line Items 2014-08-08 02:18:01:733 DEBUG Doc Changed on //Interchange/RequestForQuote/LineItem/@Description 2014-08-08 02:18:01:733 DEBUG Electric motor, Vertical mounted, Type- 4AP 71-45, 3phase, 440 Volts, 60 Hz, 0.29 KW, 0.8 Amp & 1656 RPM, Fan Motor, 3-phase, 440Volts, 0.8 Amp, 60 Hz, 0.29KW & RPM-1656 not equal to 2/2 way solenoid valve- servo assisted for emergency fire pump, Maker: Burkert, Details: 5281 A 13.0 NBR, MS, G 1/2, PNO 0.2 - 16 bar, 230 V, 50-60 Hz8 W, G 1/2, PNO 0.2-16 Bar 2014-08-08 02:18:01:733 DEBUG Committing database transaction 2014-08-08 02:18:01:733 DEBUG Closing connection to the database 2014-08-08 02:18:01:734 INFO end status=NOOP filename=999999_20140808021801_f90e96c9 elapsed=74ms fileContents:null "; $lines = explode(PHP_EOL, $txt); $messages = array(); foreach ($lines as $line) { // regexp is 'timestamp debug_level message' if (!preg_match('/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}:\d{3} \w+ (.*)$/', $line, $matches)) { // top lines with no timestamp, safe to skip them continue; } $message = $matches[1]; // now filter by the first word of the message if (!preg_match('/^(.*) .*$/', $message, $words)) { // no first word means only one word, skip it continue; } $word = $words[1]; print $word . PHP_EOL; if (in_array($word, array( 'opening', 'validating', 'reading', 'constructing', 'saving', 'found', 'rfq', 'comparing', 'committing', 'closing', 'end' ))) { // skip know technical message continue; } $messages[] = $message; } print_r($messages);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 36
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 36
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 16
Branch analysis from position: 16
2 jumps found. (Code = 43) Position 1 = 25, Position 2 = 26
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 26
2 jumps found. (Code = 43) Position 1 = 32, Position 2 = 33
Branch analysis from position: 32
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 33
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 16
Branch analysis from position: 36
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 36
filename:       /in/Ail6B
function name:  (null)
number of ops:  41
compiled vars:  !0 = $txt, !1 = $lines, !2 = $messages, !3 = $line, !4 = $matches, !5 = $message, !6 = $words, !7 = $word
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'resultCode%3ANoOp%0AerrorMessage%3Anull%0AprocessMessage%3A2014-08-08+02%3A18%3A01%3A659+INFO+begin+appName%3Dixp_app%0AappVersion%3D2012_11_v01+integrationCode%3D+clientId%3D999999+userName%3Dautosuggest1%0AdocId%3D12963337+docType%3DRFQ+recipientId%3D58992+encodingTypeCode%3DUTF-8+%0A2014-08-08+02%3A18%3A01%3A659+DEBUG+Opening+connection+to+the+database%0A2014-08-08+02%3A18%3A01%3A660+DEBUG+Validating+client%27s+account%0A2014-08-08+02%3A18%3A01%3A668+DEBUG+Reading+original+document+details+from+database%0A2014-08-08+02%3A18%3A01%3A668+DEBUG+Reading+Header+from+Database%0A2014-08-08+02%3A18%3A01%3A671+DEBUG+Reading+Line+Items+from+Database%0A2014-08-08+02%3A18%3A01%3A673+DEBUG+Reading+Party+Contacts+from+Database%0A2014-08-08+02%3A18%3A01%3A675+DEBUG+Constructing+Interchange%0A2014-08-08+02%3A18%3A01%3A675+DEBUG+Constructing+Request+For+Quote%0A2014-08-08+02%3A18%3A01%3A678+DEBUG+Constructing+Dates%0A2014-08-08+02%3A18%3A01%3A678+DEBUG+Constructing+References%0A2014-08-08+02%3A18%3A01%3A678+DEBUG+Constructing+Comments%0A2014-08-08+02%3A18%3A01%3A679+DEBUG+Constructing+Parties%0A2014-08-08+02%3A18%3A01%3A679+DEBUG+Constructing+Line+Items%0A2014-08-08+02%3A18%3A01%3A680+DEBUG+Saving+original+document+content+to+file+-+raw%0A2014-08-08+02%3A18%3A01%3A705+INFO+Found+1+possible+RFQ+matches+with+a+Reference+No.%3A%0A14%2F440+that+was+forwarded+by+Match+Buyer+11107+to+Supplier+58992%0A2014-08-08+02%3A18%3A01%3A705+INFO+RFQ+with+Internal+Ref+No.%3A+12884046%0A2014-08-08+02%3A18%3A01%3A706+INFO+RFQ+12963337+will+now+be+compared+with+the+list+of%0Apossible+RFQ+matches%0A2014-08-08+02%3A18%3A01%3A706+INFO+Comparing+RFQ+12963337+with+RFQ+12884046%0A2014-08-08+02%3A18%3A01%3A706+DEBUG+Reading+Header+from+Database%0A2014-08-08+02%3A18%3A01%3A708+DEBUG+Reading+Line+Items+from+Database%0A2014-08-08+02%3A18%3A01%3A720+DEBUG+Reading+Party+Contacts+from+Database%0A2014-08-08+02%3A18%3A01%3A727+DEBUG+Constructing+Interchange%0A2014-08-08+02%3A18%3A01%3A728+DEBUG+Constructing+Request+For+Quote%0A2014-08-08+02%3A18%3A01%3A730+DEBUG+Constructing+Dates%0A2014-08-08+02%3A18%3A01%3A730+DEBUG+Constructing+References%0A2014-08-08+02%3A18%3A01%3A731+DEBUG+Constructing+Comments%0A2014-08-08+02%3A18%3A01%3A731+DEBUG+Constructing+Parties%0A2014-08-08+02%3A18%3A01%3A732+DEBUG+Constructing+Line+Items%0A2014-08-08+02%3A18%3A01%3A733+DEBUG+Doc+Changed+on%0A%2F%2FInterchange%2FRequestForQuote%2FLineItem%2F%40Description%0A2014-08-08+02%3A18%3A01%3A733+DEBUG+Electric+motor%2C+Vertical+mounted%2C+Type-+4AP%0A71-45%2C+3phase%2C+440+Volts%2C+60+Hz%2C+0.29+KW%2C+0.8+Amp+%26+1656+RPM%2C+Fan+Motor%2C%0A3-phase%2C+440Volts%2C+0.8+Amp%2C+60+Hz%2C+0.29KW+%26+RPM-1656+not+equal+to+2%2F2+way%0Asolenoid+valve-+servo+assisted+for+emergency+fire+pump%2C+Maker%3A+Burkert%2C+Details%3A%0A5281+A+13.0+NBR%2C+MS%2C+G+1%2F2%2C+PNO+0.2+-+16+bar%2C+230+V%2C+50-60+Hz8+W%2C+G+1%2F2%2C+PNO%0A0.2-16+Bar+%0A2014-08-08+02%3A18%3A01%3A733+DEBUG+Committing+database+transaction%0A2014-08-08+02%3A18%3A01%3A733+DEBUG+Closing+connection+to+the+database%0A2014-08-08+02%3A18%3A01%3A734+INFO+end+status%3DNOOP%0Afilename%3D999999_20140808021801_f90e96c9+elapsed%3D74ms%0A%0A%0AfileContents%3Anull%0A'
   55     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '%0A'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $9      
          5        ASSIGN                                                   !1, $9
   56     6        ASSIGN                                                   !2, <array>
   57     7      > FE_RESET_R                                       $12     !1, ->36
          8    > > FE_FETCH_R                                               $12, !3, ->36
   59     9    >   INIT_FCALL                                               'preg_match'
         10        SEND_VAL                                                 '%2F%5E%5Cd%7B4%7D-%5Cd%7B2%7D-%5Cd%7B2%7D+%5Cd%7B2%7D%3A%5Cd%7B2%7D%3A%5Cd%7B2%7D%3A%5Cd%7B3%7D+%5Cw%2B+%28.%2A%29%24%2F'
         11        SEND_VAR                                                 !3
         12        SEND_REF                                                 !4
         13        DO_ICALL                                         $13     
         14        BOOL_NOT                                         ~14     $13
         15      > JMPZ                                                     ~14, ->16
   62    16    >   FETCH_DIM_R                                      ~15     !4, 1
         17        ASSIGN                                                   !5, ~15
   64    18        INIT_FCALL                                               'preg_match'
         19        SEND_VAL                                                 '%2F%5E%28.%2A%29+.%2A%24%2F'
         20        SEND_VAR                                                 !5
         21        SEND_REF                                                 !6
         22        DO_ICALL                                         $17     
         23        BOOL_NOT                                         ~18     $17
         24      > JMPZ                                                     ~18, ->26
   66    25    > > JMP                                                      ->8
   69    26    >   FETCH_DIM_R                                      ~19     !6, 1
         27        ASSIGN                                                   !7, ~19
   70    28        CONCAT                                           ~21     !7, '%0A'
         29        ECHO                                                     ~21
   72    30        IN_ARRAY                                                 !7, <array>
         31      > JMPZ                                                     ~22, ->33
   86    32    > > JMP                                                      ->8
   89    33    >   ASSIGN_DIM                                               !2
         34        OP_DATA                                                  !5
   57    35      > JMP                                                      ->8
         36    >   FE_FREE                                                  $12
   92    37        INIT_FCALL                                               'print_r'
         38        SEND_VAR                                                 !2
         39        DO_ICALL                                                 
         40      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.66 ms | 1392 KiB | 19 Q