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); var_dump($templateBody); var_dump($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/Kap2n
function name:  (null)
number of ops:  74
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                                               'var_dump'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                                 
   31    13        INIT_FCALL                                               'var_dump'
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                                 
   32    16        INIT_FCALL                                               'preg_replace'
         17        SEND_VAL                                                 '%2F%5E%5Cs%2B%2Fm'
         18        SEND_VAL                                                 ''
         19        SEND_VAR                                                 !0
         20        DO_ICALL                                         $11     
         21        ASSIGN                                                   !0, $11
   33    22        INIT_FCALL                                               'preg_replace'
         23        SEND_VAL                                                 '%2F%5E%5Cs%2B%2Fm'
         24        SEND_VAL                                                 ''
         25        SEND_VAR                                                 !1
         26        DO_ICALL                                         $13     
         27        ASSIGN                                                   !1, $13
   35    28        INIT_FCALL                                               'preg_replace'
   37    29        INIT_FCALL                                               'preg_quote'
         30        SEND_VAL                                                 '%5B%23applicant_name_forename%5D'
         31        DO_ICALL                                         $15     
         32        CONCAT                                           ~16     '%2F', $15
         33        CONCAT                                           ~17     ~16, '%2F'
         34        INIT_ARRAY                                       ~18     ~17
   38    35        INIT_FCALL                                               'preg_quote'
         36        SEND_VAL                                                 '%5B%23company_name%5D'
         37        DO_ICALL                                         $19     
         38        CONCAT                                           ~20     '%2F', $19
         39        CONCAT                                           ~21     ~20, '%2F'
         40        ADD_ARRAY_ELEMENT                                ~18     ~21
   39    41        INIT_FCALL                                               'preg_quote'
         42        SEND_VAL                                                 '%5B%23docs_recorded_delivery_receipt%5D'
         43        DO_ICALL                                         $22     
         44        CONCAT                                           ~23     '%2F', $22
         45        CONCAT                                           ~24     ~23, '%2F'
         46        ADD_ARRAY_ELEMENT                                ~18     ~24
         47        SEND_VAL                                                 ~18
   41    48        SEND_VAL                                                 'TEMPORARYREPLACER'
   42    49        SEND_VAR                                                 !0
         50        DO_ICALL                                         $25     
   35    51        ASSIGN                                                   !0, $25
   44    52        INIT_FCALL                                               'preg_quote'
         53        SEND_VAR                                                 !0
         54        SEND_VAL                                                 '%2F'
         55        DO_ICALL                                         $27     
         56        ASSIGN                                                   !0, $27
   45    57        INIT_FCALL                                               'preg_replace'
         58        SEND_VAL                                                 '%2FTEMPORARYREPLACER%2F'
         59        SEND_VAL                                                 '%28.%2A%29'
         60        SEND_VAR                                                 !0
         61        DO_ICALL                                         $29     
         62        ASSIGN                                                   !0, $29
   47    63        INIT_FCALL                                               'preg_match'
         64        CONCAT                                           ~31     '%2F', !0
         65        CONCAT                                           ~32     ~31, '%2F'
         66        SEND_VAL                                                 ~32
         67        SEND_VAR                                                 !1
         68        SEND_REF                                                 !2
         69        DO_ICALL                                                 
   49    70        INIT_FCALL                                               'var_dump'
         71        SEND_VAR                                                 !2
         72        DO_ICALL                                                 
         73      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
187.38 ms | 1400 KiB | 23 Q