3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = <<<EOD <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="content-type"> <meta content="text/html"> <title>Bertoni - tašky s příběhem</title> <style type="text/css"> </style> </head> <body bgcolor="#edeeef" leftmargin="0" marginheigh="0" marginwidth="0" style="background-color:#edeeef" topmargin="0"><!--Pokud se vám zpráva nezobrazuje správně, klikněte zde.--> <table align="center" bgcolor="#FFFFFF" width="100%"> <tbody> <tr> <td> </td> </tr> </tbody> </table> <!--banner--> <table align="center" cellpadding="0" cellspacing="0" width="600"> <tbody> <tr> <td align="center" height="212" width="600"><a href="http://milvai.cz/bertoni-tasky-s-pribehem.html?utm_source=newsletter&amp;utm_medium=email&amp;utm_campaign=1536-bertoni-tasky-s-pribehem"><img align="center" alt="Hlavní banner pro kampaň Bertoni - tašky s příběhem" src="http://cdn.deliverio.cz/milvai1536/images/banner.jpg" style="display:block; border:0;" title="Bertoni - tašky s příběhem" /></a> </td> </tr> </tbody> </table> <!--Text--> <!--space--> <table align="center" cellpadding="0" cellspacing="0" height="6px" width="600"> <tbody> <tr> <td align="center" height="6px" width="600">&nbsp; </td> </tr> </tbody> </table> <!--produkty 1 řada--> <!--Ostatní kampaně--><!--socialni site--> <table align="center" cellpadding="0" cellspacing="0" height="20" width="600"> <tbody> <tr> <td>&nbsp; </td> </tr> </tbody> </table> <!--#--> <table align="center" cellpadding="0" cellspacing="0" height="20" width="600"> <tbody> <tr> <td>&nbsp; </td> </tr> </tbody> </table> <table align="center" cellpadding="0" cellspacing="0" width="600"> <tbody> <tr> <td align="center" width="600"><font style="font-family:Tahoma,Verdana,Arial; font-size:12px; color:#707070;" text-align="center">#milvaicz</font> </td> </tr> </tbody> </table> <!--konec--> <p>[CONSENT_FOOTER] </p> </body> </html> EOD; echo preg_replace('/<body(.*?)>((?:.|\n)*)<\/body>/', '<body><div$1>$2</div><div class="footer">FOOTER</div></body>', $html); echo "ERROR:" . preg_last_error();
Output for 5.5.0 - 5.5.38, 5.6.0 - 5.6.40, 7.0.6 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="content-type"> <meta content="text/html"> <title>Bertoni - tašky s příběhem</title> <style type="text/css"> </style> </head> <body><div bgcolor="#edeeef" leftmargin="0" marginheigh="0" marginwidth="0" style="background-color:#edeeef" topmargin="0"><!--Pokud se vám zpráva nezobrazuje správně, klikněte zde.--> <table align="center" bgcolor="#FFFFFF" width="100%"> <tbody> <tr> <td> </td> </tr> </tbody> </table> <!--banner--> <table align="center" cellpadding="0" cellspacing="0" width="600"> <tbody> <tr> <td align="center" height="212" width="600"><a href="http://milvai.cz/bertoni-tasky-s-pribehem.html?utm_source=newsletter&amp;utm_medium=email&amp;utm_campaign=1536-bertoni-tasky-s-pribehem"><img align="center" alt="Hlavní banner pro kampaň Bertoni - tašky s příběhem" src="http://cdn.deliverio.cz/milvai1536/images/banner.jpg" style="display:block; border:0;" title="Bertoni - tašky s příběhem" /></a> </td> </tr> </tbody> </table> <!--Text--> <!--space--> <table align="center" cellpadding="0" cellspacing="0" height="6px" width="600"> <tbody> <tr> <td align="center" height="6px" width="600">&nbsp; </td> </tr> </tbody> </table> <!--produkty 1 řada--> <!--Ostatní kampaně--><!--socialni site--> <table align="center" cellpadding="0" cellspacing="0" height="20" width="600"> <tbody> <tr> <td>&nbsp; </td> </tr> </tbody> </table> <!--#--> <table align="center" cellpadding="0" cellspacing="0" height="20" width="600"> <tbody> <tr> <td>&nbsp; </td> </tr> </tbody> </table> <table align="center" cellpadding="0" cellspacing="0" width="600"> <tbody> <tr> <td align="center" width="600"><font style="font-family:Tahoma,Verdana,Arial; font-size:12px; color:#707070;" text-align="center">#milvaicz</font> </td> </tr> </tbody> </table> <!--konec--> <p>[CONSENT_FOOTER] </p> </div><div class="footer">FOOTER</div></body> </html> ERROR:0
Output for 7.0.0 - 7.0.5
ERROR:6

preferences:
254.87 ms | 401 KiB | 326 Q