3v4l.org

run code in 300+ PHP versions simultaneously
<?php function _remove_between($tag,$subject) { return preg_replace("/".$tag."[\S\s.]+?".$tag."/i", "", $subject); } $html = '{% load ad_tags %}{% load smart_if %}<div id="wrapper">{% set_list 1 2 as sub_0_range %}{% set_list 3 4 5 6 7 8 9 as sub_1_range %}{% for ad in ads %}{% if forloop.counter in sub_0_range %}<div class="sub_0">{% if forloop.counter == sub_0_range.0 %}<div id="header"> <h1>Great Auto Insurance Rates!</h1> <h2>Click on a handful of the companies below to get your rates.</h2> </div><div id="featured-listings"> <p class="listing-grp-title"><strong>Featured Insurance Providers</strong></p>{% endif %} <!--WRAPPERSTART--><div id="header"> <h1>Great Auto Insurance Rates!</h1> <h2>Click on a handful of the companies below to get your rates.</h2> </div><div id="featured-listings"> <p class="listing-grp-title"><strong>Featured Insurance Providers</strong></p><!--WRAPPERSTART--> <div class="featured-wrap"> <div class="star"><img src="http://dev-15-php.datalot.com/images/ad_temp/star.png" alt="star" /></div> <div class="container"> <div class="logo"> <a href=""><img src="http://dev-15-php.datalot.com/images/ad_temp/feature-logo2.png" alt="" /></a> </div> <div class="copy"> <p class="headline"><a href="">{{ad.headline|safe}}</a></p> {{ad.body|safe}} </div> <div class="btn"><a href=""><img src="http://dev-15-php.datalot.com/images/ad_temp/button_top3.gif" alt="Free Quote" /></a></div> <div class="clear"></div> </div> </div> <div class="clear"></div> {% if forloop.counter == sub_0_range|last or forloop.last %}</div>{% endif %}</div>{% else %}{% if forloop.counter in sub_1_range %}<div class="sub_1">{% if forloop.counter == sub_1_range.0 %}<div id="top-listings">{% endif %} <div class="top-wrap"> <div><p class="number">{{forloop.counter|add:-2}}</p></div> <div class="container"> <div class="logo"> <a href=""><img class="featured-logo" src="http://dev-15-php.datalot.com/images/ad_temp/feature-logo2.png" alt="" /></a> </div> <div class="copy"> <p class="headline"><a href="">{{ad.headline|safe}}</a></p> {{ad.body|safe}} </div> <div class="btn"><a href=""><img src="http://dev-15-php.datalot.com/images/ad_temp/button_top3.gif" alt="Free Quote" /></a></div> <div class="clear"></div> </div> <div class="clear"></div> </div> {% if forloop.counter == sub_1_range|last or forloop.last %}</div></div>{% endif %}</div>{% else %}<!-- DEFAULT --><!-- DEFAULT -->{% endif %}{% endif %}{% endfor %}</div>'; $html = _remove_between('<!--WRAPPERSTART-->',$html); echo $html;
Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.40, 7.0.0 - 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
{% load ad_tags %}{% load smart_if %}<div id="wrapper">{% set_list 1 2 as sub_0_range %}{% set_list 3 4 5 6 7 8 9 as sub_1_range %}{% for ad in ads %}{% if forloop.counter in sub_0_range %}<div class="sub_0">{% if forloop.counter == sub_0_range.0 %}<div id="header"> <h1>Great Auto Insurance Rates!</h1> <h2>Click on a handful of the companies below to get your rates.</h2> </div><div id="featured-listings"> <p class="listing-grp-title"><strong>Featured Insurance Providers</strong></p>{% endif %} <div class="featured-wrap"> <div class="star"><img src="http://dev-15-php.datalot.com/images/ad_temp/star.png" alt="star" /></div> <div class="container"> <div class="logo"> <a href=""><img src="http://dev-15-php.datalot.com/images/ad_temp/feature-logo2.png" alt="" /></a> </div> <div class="copy"> <p class="headline"><a href="">{{ad.headline|safe}}</a></p> {{ad.body|safe}} </div> <div class="btn"><a href=""><img src="http://dev-15-php.datalot.com/images/ad_temp/button_top3.gif" alt="Free Quote" /></a></div> <div class="clear"></div> </div> </div> <div class="clear"></div> {% if forloop.counter == sub_0_range|last or forloop.last %}</div>{% endif %}</div>{% else %}{% if forloop.counter in sub_1_range %}<div class="sub_1">{% if forloop.counter == sub_1_range.0 %}<div id="top-listings">{% endif %} <div class="top-wrap"> <div><p class="number">{{forloop.counter|add:-2}}</p></div> <div class="container"> <div class="logo"> <a href=""><img class="featured-logo" src="http://dev-15-php.datalot.com/images/ad_temp/feature-logo2.png" alt="" /></a> </div> <div class="copy"> <p class="headline"><a href="">{{ad.headline|safe}}</a></p> {{ad.body|safe}} </div> <div class="btn"><a href=""><img src="http://dev-15-php.datalot.com/images/ad_temp/button_top3.gif" alt="Free Quote" /></a></div> <div class="clear"></div> </div> <div class="clear"></div> </div> {% if forloop.counter == sub_1_range|last or forloop.last %}</div></div>{% endif %}</div>{% else %}<!-- DEFAULT --><!-- DEFAULT -->{% endif %}{% endif %}{% endfor %}</div>

preferences:
242.41 ms | 413 KiB | 456 Q