3v4l.org

run code in 300+ PHP versions simultaneously
<? <script> var product_filter_arr = []; for (var key in res) { var product_id = res[key]['product_id']; var name = res[key]['name']; var price = res[key]['price']; var image = res[key]['image']; var cat_id = $("input[name~='cat_id']").val(); // id категории switch(cat_id) { case '200': var link = "Auto?"; break; case '201': var link = "Moto?"; break; } var product = `<div class="product-layout product-grid product-style-1 col-lg-4 col-md-4 col-sm-4 col-xs-4 product-items"> <div class="product-thumb"> <div class="product-item"> <div class="image swatches-image-container"> <a href="https://d.ru/${link}product_id=${product_id}"> <img src="d.ru/image/${image}" class="img-responsive img-cate-${product_id}"> </a> <div class="button-group"> <button type="button" class="button-wishlist" title="В закладки" onclick="wishlist.add('${product_id}');"><span>В закладки</span></button> <button type="button" class="button-compare" title="В сравнение" onclick="compare.add('${product_id}');"><span>В сравнение</span></button> <button class="button-quickview" type="button" title="Быстрый просмотр" onclick="ptquickview.ajaxView('https://d.ru/Rings?product_id=${product_id}')"><span>Быстрый просмотр</span></button> </div> <div class="box-cart"> <button type="button" class="button-cart" title="Купить" onclick="cart.add('${product_id}', '1');"><span>Купить</span></button> </div> </div> <div class="caption"> <h4><a href="https://d.ru/${link}product_id=${product_id}">${name}</a></h4> <p class="price">${price}</p> </div> </div> </div> </div>`; var products = product_filter_arr.push(product); } </script>
Output for git.master, git.master_jit, rfc.property-hooks
<? <script> var product_filter_arr = []; for (var key in res) { var product_id = res[key]['product_id']; var name = res[key]['name']; var price = res[key]['price']; var image = res[key]['image']; var cat_id = $("input[name~='cat_id']").val(); // id категории switch(cat_id) { case '200': var link = "Auto?"; break; case '201': var link = "Moto?"; break; } var product = `<div class="product-layout product-grid product-style-1 col-lg-4 col-md-4 col-sm-4 col-xs-4 product-items"> <div class="product-thumb"> <div class="product-item"> <div class="image swatches-image-container"> <a href="https://d.ru/${link}product_id=${product_id}"> <img src="d.ru/image/${image}" class="img-responsive img-cate-${product_id}"> </a> <div class="button-group"> <button type="button" class="button-wishlist" title="В закладки" onclick="wishlist.add('${product_id}');"><span>В закладки</span></button> <button type="button" class="button-compare" title="В сравнение" onclick="compare.add('${product_id}');"><span>В сравнение</span></button> <button class="button-quickview" type="button" title="Быстрый просмотр" onclick="ptquickview.ajaxView('https://d.ru/Rings?product_id=${product_id}')"><span>Быстрый просмотр</span></button> </div> <div class="box-cart"> <button type="button" class="button-cart" title="Купить" onclick="cart.add('${product_id}', '1');"><span>Купить</span></button> </div> </div> <div class="caption"> <h4><a href="https://d.ru/${link}product_id=${product_id}">${name}</a></h4> <p class="price">${price}</p> </div> </div> </div> </div>`; var products = product_filter_arr.push(product); } </script>

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:
162.32 ms | 417 KiB | 5 Q