3v4l.org

run code in 300+ PHP versions simultaneously
<?php $templateBody = '<p>Dear [#applicant_name_forename],</p> <p>We have received your application for a criminal record check with [#company_name] and have processed your ID documents. These will be posted back to you today via Royal Mail. The tracking number for these items is [#docs_recorded_delivery_receipt] and you can view their return progress via the Royal Mail website:</p> <p>http://www.royalmail.com/trackdetails</p> <p>Tracking is available after 5pm today.</p> <p>For more information about checking the progress of your application or general enquiries on the process please view our FAQ pages:</p> <p>http://www.ddc.uk.net/help-advice/dbs-checkfaqs/</p> <p>Regards</p> <p>DDC Countersignatory Team</p>'; $emailBody = 'Dear Morty, We have received your application for a criminal record check with Galatic Federation and have processed your ID documents. These will be posted back to you today via Courier Flap. The tracking number for these items is 123123123 and you can view their return progress via the Courier Flap website: http://www.courierflap.com/trackdetails Tracking is available after 5pm today. For more information about checking the progress of your application or general enquiries on the process please view our FAQ pages: http://www.ddc.uk.net/help-advice/dbs-checkfaqs/ Regards DDC Countersignatory Team'; $templateBody = strip_tags($templateBody); $emailBody = strip_tags($emailBody); $templateBody = preg_replace('/^\s+/m', '', $templateBody); $emailBody = preg_replace('/^\s+/m', '', $emailBody); $templateBody = preg_replace( [ '/' . preg_quote('[#applicant_name_forename]') . '/', '/' . preg_quote('[#company_name]') . '/', '/' . preg_quote('[#docs_recorded_delivery_receipt]') . '/' ], 'TEMPORARYREPLACER', $templateBody ); $templateBody = preg_quote($templateBody, '/'); $templateBody = preg_replace('/TEMPORARYREPLACER/', '(.*)', $templateBody); preg_match('/' . $templateBody . '/', $emailBody, $matches); var_dump($matches);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FqFg7
function name:  (null)
number of ops:  68
compiled vars:  !0 = $templateBody, !1 = $emailBody, !2 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3Cp%3EDear+%5B%23applicant_name_forename%5D%2C%3C%2Fp%3E%0A%3Cp%3EWe+have+received+your+application+for+a+criminal+record+check+with+%5B%23company_name%5D+and+have+processed+your+ID+documents.+These+will+be+posted+back+to+you+today+via+Royal+Mail.+The+tracking+number+for+these+items+is+%5B%23docs_recorded_delivery_receipt%5D+and+you+can+view+their+return+progress+via+the+Royal+Mail+website%3A%3C%2Fp%3E%0A%3Cp%3Ehttp%3A%2F%2Fwww.royalmail.com%2Ftrackdetails%3C%2Fp%3E%0A%3Cp%3ETracking+is+available+after+5pm+today.%3C%2Fp%3E%0A%3Cp%3EFor+more+information+about+checking+the+progress+of+your+application+or+general+enquiries+on+the+process+please+view+our+FAQ+pages%3A%3C%2Fp%3E%0A%3Cp%3Ehttp%3A%2F%2Fwww.ddc.uk.net%2Fhelp-advice%2Fdbs-checkfaqs%2F%3C%2Fp%3E%0A%3Cp%3ERegards%3C%2Fp%3E%0A%3Cp%3EDDC+Countersignatory+Team%3C%2Fp%3E'
   12     1        ASSIGN                                                   !1, 'Dear+Morty%2C%0A%0AWe+have+received+your+application+for+a+criminal+record+check+with+Galatic+Federation+and+have+processed+your+ID+documents.+These+will+be+posted+back+to+you+today+via+Courier+Flap.+The+tracking+number+for+these+items+is+123123123+and+you+can+view+their+return+progress+via+the+Courier+Flap+website%3A%0A%0Ahttp%3A%2F%2Fwww.courierflap.com%2Ftrackdetails%0A%0ATracking+is+available+after+5pm+today.%0A%0AFor+more+information+about+checking+the+progress+of+your+application+or+general+enquiries+on+the+process+please+view+our+FAQ+pages%3A%0A%0Ahttp%3A%2F%2Fwww.ddc.uk.net%2Fhelp-advice%2Fdbs-checkfaqs%2F%0A%0ARegards%0A%0ADDC+Countersignatory+Team'
   28     2        INIT_FCALL                                               'strip_tags'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $5      
          5        ASSIGN                                                   !0, $5
   29     6        INIT_FCALL                                               'strip_tags'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                         $7      
          9        ASSIGN                                                   !1, $7
   30    10        INIT_FCALL                                               'preg_replace'
         11        SEND_VAL                                                 '%2F%5E%5Cs%2B%2Fm'
         12        SEND_VAL                                                 ''
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                         $9      
         15        ASSIGN                                                   !0, $9
   31    16        INIT_FCALL                                               'preg_replace'
         17        SEND_VAL                                                 '%2F%5E%5Cs%2B%2Fm'
         18        SEND_VAL                                                 ''
         19        SEND_VAR                                                 !1
         20        DO_ICALL                                         $11     
         21        ASSIGN                                                   !1, $11
   33    22        INIT_FCALL                                               'preg_replace'
   35    23        INIT_FCALL                                               'preg_quote'
         24        SEND_VAL                                                 '%5B%23applicant_name_forename%5D'
         25        DO_ICALL                                         $13     
         26        CONCAT                                           ~14     '%2F', $13
         27        CONCAT                                           ~15     ~14, '%2F'
         28        INIT_ARRAY                                       ~16     ~15
   36    29        INIT_FCALL                                               'preg_quote'
         30        SEND_VAL                                                 '%5B%23company_name%5D'
         31        DO_ICALL                                         $17     
         32        CONCAT                                           ~18     '%2F', $17
         33        CONCAT                                           ~19     ~18, '%2F'
         34        ADD_ARRAY_ELEMENT                                ~16     ~19
   37    35        INIT_FCALL                                               'preg_quote'
         36        SEND_VAL                                                 '%5B%23docs_recorded_delivery_receipt%5D'
         37        DO_ICALL                                         $20     
         38        CONCAT                                           ~21     '%2F', $20
         39        CONCAT                                           ~22     ~21, '%2F'
         40        ADD_ARRAY_ELEMENT                                ~16     ~22
         41        SEND_VAL                                                 ~16
   39    42        SEND_VAL                                                 'TEMPORARYREPLACER'
   40    43        SEND_VAR                                                 !0
         44        DO_ICALL                                         $23     
   33    45        ASSIGN                                                   !0, $23
   42    46        INIT_FCALL                                               'preg_quote'
         47        SEND_VAR                                                 !0
         48        SEND_VAL                                                 '%2F'
         49        DO_ICALL                                         $25     
         50        ASSIGN                                                   !0, $25
   43    51        INIT_FCALL                                               'preg_replace'
         52        SEND_VAL                                                 '%2FTEMPORARYREPLACER%2F'
         53        SEND_VAL                                                 '%28.%2A%29'
         54        SEND_VAR                                                 !0
         55        DO_ICALL                                         $27     
         56        ASSIGN                                                   !0, $27
   45    57        INIT_FCALL                                               'preg_match'
         58        CONCAT                                           ~29     '%2F', !0
         59        CONCAT                                           ~30     ~29, '%2F'
         60        SEND_VAL                                                 ~30
         61        SEND_VAR                                                 !1
         62        SEND_REF                                                 !2
         63        DO_ICALL                                                 
   47    64        INIT_FCALL                                               'var_dump'
         65        SEND_VAR                                                 !2
         66        DO_ICALL                                                 
         67      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.88 ms | 1400 KiB | 23 Q