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);
Output for git.master, git.master_jit, rfc.property-hooks
array(0) { }

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
67.67 ms | 401 KiB | 8 Q