3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $emailtempalte = '<table border="0" cellpadding="0" cellspacing="0" style="margin: 0 auto; width: 100%; margin: 0px auto;    max-width: 600px;" width="600">    <tbody>        <tr>            <td>&nbsp;</td>        </tr>        <tr>            <td align="center" valign="top"><img alt="" src="http://cdn.socialannex.com/custom_images/9396340/COV7Y3_logo.png" style="max-width:440px; width: 100%;margin: 0px auto;" /></td>        </tr>        <tr>            <td style="border-top:1px solid #aeaeae;">&nbsp;</td>        </tr>        <tr>            <td>&nbsp;</td>        </tr>        <tr>            <td align="center" style="font-family:Helvetica,Arial; font-size:30px; color:#000; text-transform: uppercase;" valign="top">Your Review<br />            Has Been Approved!</td>        </tr>        <tr>            <td>&nbsp;</td>        </tr>        <tr>            <td align="center" style="font-family:Helvetica,Arial; font-size:14px; color:#000;" valign="top">Thank you for your review. Please click on &ldquo;View Review&rdquo;<br />            below to see your approved review.</td>        </tr>        <tr>            <td>&nbsp;</td>        </tr>        <tr>            <td align="center" valign="top"><img alt="" height="250px" src="#productImageUrl#" width="268px" /></td>        </tr>        <tr>            <td>&nbsp;</td>        </tr>        <tr>            <td align="center" style="font-family:Helvetica,Arial; font-size:22px; color:#000; text-transform: uppercase;" valign="top">#productName#</td>        </tr>        <tr>            <td>&nbsp;</td>        </tr>        <tr>            <td>&nbsp;</td>        </tr>        <tr>            <td align="center" valign="top"><a href="#producturl##sas28utmtag#"><img alt="" src="http://cdn.socialannex.com/custom_images/9396340/CXGJEG_view.png" /></a></td>        </tr>        <tr>            <td height="60">&nbsp;</td>        </tr>        <tr>            <td align="center" style="background:#eaeaea;font-family:Helvetica,Arial; font-size:11px; color:#000; height:80px;" valign="middle">Many Thanks<br />            The Wilsons Leather Team</td>        </tr>    </tbody></table><sas28utm>utm_campaign=write_review&utm_medium=email&utm_source=socialannex</sas28utm>'; echo substr($emailtempalte, strpos($emailtempalte, "<sas28utm>")+10, (strpos($emailtempalte, "</sas28utm>")+11)); echo "\n\n-----------------------\n\n"; $emailtempalte = '<sas28utm>utm_campaign=write_review&utm_medium=email&utm_source=socialannex</sas28utm><table border="0" cellpadding="0" cellspacing="0" style="margin: 0 auto; width: 100%; margin: 0px auto;    max-width: 600px;" width="600">    <tbody>        <tr>            <td>&nbsp;</td>        </tr>        <tr>            <td align="center" valign="top"><img alt="" src="http://cdn.socialannex.com/custom_images/9396340/COV7Y3_logo.png" style="max-width:440px; width: 100%;margin: 0px auto;" /></td>        </tr>        <tr>            <td style="border-top:1px solid #aeaeae;">&nbsp;</td>        </tr>        <tr>            <td>&nbsp;</td>        </tr>        <tr>            <td align="center" style="font-family:Helvetica,Arial; font-size:30px; color:#000; text-transform: uppercase;" valign="top">Your Review<br />            Has Been Approved!</td>        </tr>        <tr>            <td>&nbsp;</td>        </tr>        <tr>            <td align="center" style="font-family:Helvetica,Arial; font-size:14px; color:#000;" valign="top">Thank you for your review. Please click on &ldquo;View Review&rdquo;<br />            below to see your approved review.</td>        </tr>        <tr>            <td>&nbsp;</td>        </tr>        <tr>            <td align="center" valign="top"><img alt="" height="250px" src="#productImageUrl#" width="268px" /></td>        </tr>        <tr>            <td>&nbsp;</td>        </tr> <sas28utm>utm_campaign=write_review&utm_medium=email&utm_source=socialannex</sas28utm>       <tr>            <td align="center" style="font-family:Helvetica,Arial; font-size:22px; color:#000; text-transform: uppercase;" valign="top">#productName#</td>        </tr>        <tr>            <td>&nbsp;</td>        </tr>        <tr>            <td>&nbsp;</td>        </tr>        <tr>            <td align="center" valign="top"><a href="#producturl##sas28utmtag#"><img alt="" src="http://cdn.socialannex.com/custom_images/9396340/CXGJEG_view.png" /></a></td>        </tr>        <tr>            <td height="60">&nbsp;</td>        </tr>        <tr>            <td align="center" style="background:#eaeaea;font-family:Helvetica,Arial; font-size:11px; color:#000; height:80px;" valign="middle">Many Thanks<br />            The Wilsons Leather Team</td>        </tr>    </tbody></table><sas28utm>utm_campaign=write_review&utm_medium=email&utm_source=socialannex</sas28utm>'; $matches = array(); preg_match_all("/<sas28utm>[\s\S\d\D\w\W\X]*<\/sas28utm>/", $emailtempalte, $matches, PREG_SET_ORDER); print_r($matches);
based on FrTVO
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.3.0rc3
utm_campaign=write_review&utm_medium=email&utm_source=socialannex</sas28utm> ----------------------- Array ( [0] => Array ( [0] => <sas28utm>utm_campaign=write_review&utm_medium=email&utm_source=socialannex</sas28utm><table border="0" cellpadding="0" cellspacing="0" style="margin: 0 auto; width: 100%; margin: 0px auto;    max-width: 600px;" width="600">    <tbody>        <tr>            <td>&nbsp;</td>        </tr>        <tr>            <td align="center" valign="top"><img alt="" src="http://cdn.socialannex.com/custom_images/9396340/COV7Y3_logo.png" style="max-width:440px; width: 100%;margin: 0px auto;" /></td>        </tr>        <tr>            <td style="border-top:1px solid #aeaeae;">&nbsp;</td>        </tr>        <tr>            <td>&nbsp;</td>        </tr>        <tr>            <td align="center" style="font-family:Helvetica,Arial; font-size:30px; color:#000; text-transform: uppercase;" valign="top">Your Review<br />            Has Been Approved!</td>        </tr>        <tr>            <td>&nbsp;</td>        </tr>        <tr>            <td align="center" style="font-family:Helvetica,Arial; font-size:14px; color:#000;" valign="top">Thank you for your review. Please click on &ldquo;View Review&rdquo;<br />            below to see your approved review.</td>        </tr>        <tr>            <td>&nbsp;</td>        </tr>        <tr>            <td align="center" valign="top"><img alt="" height="250px" src="#productImageUrl#" width="268px" /></td>        </tr>        <tr>            <td>&nbsp;</td>        </tr> <sas28utm>utm_campaign=write_review&utm_medium=email&utm_source=socialannex</sas28utm>       <tr>            <td align="center" style="font-family:Helvetica,Arial; font-size:22px; color:#000; text-transform: uppercase;" valign="top">#productName#</td>        </tr>        <tr>            <td>&nbsp;</td>        </tr>        <tr>            <td>&nbsp;</td>        </tr>        <tr>            <td align="center" valign="top"><a href="#producturl##sas28utmtag#"><img alt="" src="http://cdn.socialannex.com/custom_images/9396340/CXGJEG_view.png" /></a></td>        </tr>        <tr>            <td height="60">&nbsp;</td>        </tr>        <tr>            <td align="center" style="background:#eaeaea;font-family:Helvetica,Arial; font-size:11px; color:#000; height:80px;" valign="middle">Many Thanks<br />            The Wilsons Leather Team</td>        </tr>    </tbody></table><sas28utm>utm_campaign=write_review&utm_medium=email&utm_source=socialannex</sas28utm> ) )