3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = <<<'TEXT' {\rtf1\ansi\ansicpg1252\uc1\htmautsp\deff2{\fonttbl{\f0\fcharset0 Times New Roman;}{\f2\fcharset0 Tahoma;}}{\colortbl\red0\green0\blue0;\red255\green255\blue255;\red0\green0\blue255;}\loch\hich\dbch\pard\plain\ltrpar\itap0{\lang1033\fs18\f2\cf0 \cf0\ql {\f2\cf2 {\ltrch <- MBisono--2/13/2015 12:01:25 PM ->}\li0\ri0\sa0\sb0\fi0\ql\par} {\f2\cf2 {\ltrch How are you? Hope all is well. Just wanted to drop you a note that our benefits seem to be getting screwed up every time we have a new employee or if someone changes something. We have certain rules set up for Class 1 and Class 2 and it does not seem like the benefits dept is following them. }\li0\ri0\sa0\sb0\fi0\ql\par} {\f2\cf2 {\ltrch }\li0\ri0\sa0\sb0\fi0\ql\par} {\f2\cf2 {\ltrch Payroll is great we love Christine. It just seems like there is always something wrong with our benefits.}\li0\ri0\sa0\sb0\fi0\ql\par} {\f2\cf2 {\ltrch }\li0\ri0\sa0\sb0\fi0\ql\par} {\f2\cf2 {\ltrch Alexis}\li0\ri0\sa0\sb0\fi0\ql\par} {\f2\cf2 {\ltrch }\li0\ri0\sa0\sb0\fi0\ql\par} {\f2\cf2 {\ltrch Met with Admin and Benefits to discuss MAcGuffin's benefits. Admin has had no issues, Benefits advised that recently an employee was set up with contributions, when it should have been 100% employer paid. }\li0\ri0\sa0\sb0\fi0\ql\par} } } TEXT; $start = preg_quote(addcslashes('{\ltrch ', '//'), '/'); $end = preg_quote(addcslashes('}\li0\ri0\sa0\sb0\fi0\ql\par}', '//'), '/'); var_export( preg_match_all( "/$start(\S.*?)\s*$end/", $string, $matches ) ? $matches[1] : 'no matches' );
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 31, Position 2 = 34
Branch analysis from position: 31
1 jumps found. (Code = 42) Position 1 = 35
Branch analysis from position: 35
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 34
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HW0mX
function name:  (null)
number of ops:  38
compiled vars:  !0 = $string, !1 = $start, !2 = $end, !3 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%7B%5Crtf1%5Cansi%5Cansicpg1252%5Cuc1%5Chtmautsp%5Cdeff2%7B%5Cfonttbl%7B%5Cf0%5Cfcharset0+Times+New+Roman%3B%7D%7B%5Cf2%5Cfcharset0+Tahoma%3B%7D%7D%7B%5Ccolortbl%5Cred0%5Cgreen0%5Cblue0%3B%5Cred255%5Cgreen255%5Cblue255%3B%5Cred0%5Cgreen0%5Cblue255%3B%7D%5Cloch%5Chich%5Cdbch%5Cpard%5Cplain%5Cltrpar%5Citap0%7B%5Clang1033%5Cfs18%5Cf2%5Ccf0+%5Ccf0%5Cql%0A%7B%5Cf2%5Ccf2+%7B%5Cltrch+%3C-+MBisono--2%2F13%2F2015+12%3A01%3A25+PM+-%3E%7D%5Cli0%5Cri0%5Csa0%5Csb0%5Cfi0%5Cql%5Cpar%7D%0A%7B%5Cf2%5Ccf2+%7B%5Cltrch+How+are+you%3F+Hope+all+is+well.++Just+wanted+to+drop+you+a+note+that+our+benefits+seem+to+be+getting+screwed+up+every+time+we+have+a+new+employee+or+if+someone+changes+something.+We+have+certain+rules+set+up+for+Class+1+and+Class+2+and+it+does+not+seem+like+the+benefits+dept+is+following+them.+%7D%5Cli0%5Cri0%5Csa0%5Csb0%5Cfi0%5Cql%5Cpar%7D%0A%7B%5Cf2%5Ccf2+%7B%5Cltrch++%7D%5Cli0%5Cri0%5Csa0%5Csb0%5Cfi0%5Cql%5Cpar%7D%0A%7B%5Cf2%5Ccf2+%7B%5Cltrch+Payroll+is+great+we+love+Christine.+It+just+seems+like+there+is+always+something+wrong+with+our+benefits.%7D%5Cli0%5Cri0%5Csa0%5Csb0%5Cfi0%5Cql%5Cpar%7D%0A%7B%5Cf2%5Ccf2+%7B%5Cltrch++%7D%5Cli0%5Cri0%5Csa0%5Csb0%5Cfi0%5Cql%5Cpar%7D%0A%7B%5Cf2%5Ccf2+%7B%5Cltrch+Alexis%7D%5Cli0%5Cri0%5Csa0%5Csb0%5Cfi0%5Cql%5Cpar%7D%0A%7B%5Cf2%5Ccf2+%7B%5Cltrch++%7D%5Cli0%5Cri0%5Csa0%5Csb0%5Cfi0%5Cql%5Cpar%7D%0A%7B%5Cf2%5Ccf2+%7B%5Cltrch+Met+with+Admin+and+Benefits+to+discuss+MAcGuffin%27s+benefits.++Admin+has+had+no+issues%2C+Benefits+advised+that+recently+an+employee+was+set+up+with+contributions%2C+when+it+should+have+been+100%25+employer+paid.+%7D%5Cli0%5Cri0%5Csa0%5Csb0%5Cfi0%5Cql%5Cpar%7D%0A%7D%0A%7D'
   17     1        INIT_FCALL                                               'preg_quote'
          2        INIT_FCALL                                               'addcslashes'
          3        SEND_VAL                                                 '%7B%5Cltrch+'
          4        SEND_VAL                                                 '%2F%2F'
          5        DO_ICALL                                         $5      
          6        SEND_VAR                                                 $5
          7        SEND_VAL                                                 '%2F'
          8        DO_ICALL                                         $6      
          9        ASSIGN                                                   !1, $6
   18    10        INIT_FCALL                                               'preg_quote'
         11        INIT_FCALL                                               'addcslashes'
         12        SEND_VAL                                                 '%7D%5Cli0%5Cri0%5Csa0%5Csb0%5Cfi0%5Cql%5Cpar%7D'
         13        SEND_VAL                                                 '%2F%2F'
         14        DO_ICALL                                         $8      
         15        SEND_VAR                                                 $8
         16        SEND_VAL                                                 '%2F'
         17        DO_ICALL                                         $9      
         18        ASSIGN                                                   !2, $9
   19    19        INIT_FCALL                                               'var_export'
   20    20        INIT_FCALL                                               'preg_match_all'
   21    21        ROPE_INIT                                     5  ~12     '%2F'
         22        ROPE_ADD                                      1  ~12     ~12, !1
         23        ROPE_ADD                                      2  ~12     ~12, '%28%5CS.%2A%3F%29%5Cs%2A'
         24        ROPE_ADD                                      3  ~12     ~12, !2
         25        ROPE_END                                      4  ~11     ~12, '%2F'
         26        SEND_VAL                                                 ~11
   22    27        SEND_VAR                                                 !0
   23    28        SEND_REF                                                 !3
   20    29        DO_ICALL                                         $15     
   23    30      > JMPZ                                                     $15, ->34
   25    31    >   FETCH_DIM_R                                      ~16     !3, 1
         32        QM_ASSIGN                                        ~17     ~16
         33      > JMP                                                      ->35
   26    34    >   QM_ASSIGN                                        ~17     'no+matches'
         35    >   SEND_VAL                                                 ~17
   19    36        DO_ICALL                                                 
   27    37      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.48 ms | 1008 KiB | 17 Q