3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $actual = <<<SOURCE <!DOCTYPE html> <html class="desktop-version"> <head> <meta name="error" content="500" /> <title>Loading...</title> <script id="page-title" type="text/html">500 - Internal Server Error</script> <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, user-scalable=no"/> <meta http-equiv="cache-control" content="max-age=0" /> <meta http-equiv="cache-control" content="no-cache" /> <meta http-equiv="expires" content="0" /> <meta http-equiv="pragma" content="no-cache" /> <link rel="shortcut icon" href="/bundles/orofrontend/default/images/favicon.ico?version=2ca56ad8" /> <link rel="stylesheet" media="all" href="/css/oro.css?version=2ca56ad8" /> <script type="text/template" id="template-datagrid-grid-view"> <div class="btn-toolbar"> <% if (choices.length) { %> <div class="btn-group views-group"> <div data-toggle="dropdown" class="btn btn-link dropdown-toggle <% if (disabled) { %>disabled<% } %>"> <%= title %> </div> <ul class="dropdown-menu"> <% _.each(choices, function (choice) { %> <li><a href="#" data-value="<%- choice.value %>"> <% if (choice.icon) { %><i class="<%- choice.icon %>"></i><% } %><%- choice.label %></a> </li> <% }); %> </ul> </div> <% } %> <% if (showActions) { %> <div class="btn-group actions-group"> <div class="btn btn-link dropdown-toggle" data-toggle="dropdown" href="#"> <%- actionsLabel %> </div> <ul class="dropdown-menu"> <% _.each(actions, function(action) { %> <% if (action.enabled) { %> <li><a href="#" class="<%- action.name %>"><%- action.label %></a></li> <% } %> <% }); %> </ul> <% if (dirty) { %> <div class="edited-label">&nbsp;-&nbsp;<%- editedLabel %></div> <% } %> </div> <% } %> </div> </script> <script type="text/template" id="template-datagrid-grid-view-label"> <% if (navbar) { %> <h1 class="oro-subtitle"><%- title %><span class="caret"></span></h1> <% } else { %> <%- title %><span class="caret"></span> <% } %> </script> <script type="text/template" id="template-datagrid-view-name-modal"> <div class="form-horizontal"> <div class="control-group"> <label class="control-label" for="gridViewName"><%- label %>:</label> <div class="controls"> <input id="gridViewName" name="name" type="text" value="<%- value %>"> </div> </div> <div class="control-group control-group-checkbox"> <label class="control-label" for="gridViewDefault"><%- defaultLabel %>:</label> <div class="controls"> <input id="gridViewDefault" name="is_default" type="checkbox" <% if(defaultChecked) { %> checked <% } %> > </div> </div> </div> </script> <script type="text/template" id="template-datagrid-view-name-error-modal"> <span for="gridViewName" class="validation-failed"><%= error %></span> </script> <script type="text-template" id="template-audit-condition-type-select"> <span class="active-filter"> <div> <div class="dropdown"> <a class="dropdown-toggle" data-toggle="dropdown" href="#"><%= selected === "changed" ? changedLabel : changedToValueLabel %></a> <ul class="dropdown-menu"> <li <%= (selected === "changed") ? 'class="active"' : '' %>> <a class="choice-value" href="#" data-value="changed"><%= changedLabel %></a> </li> <li <%= (selected === "changed_to_value") ? 'class="active"' : '' %>> <a class="choice-value" href="#" data-value="changed_to_value"><%= changedToValueLabel %></a> </li> </ul> <select style="display: none;"> <option <%= (selected === "changed") ? "selected" : "" %> value="changed"><%= changedLabel %></option> <option <%= (selected === "changed_to_value") ? "selected" : "" %> value="changed_to_value"><%= changedToValueLabel %></option> </select> <span class="active-filter"> </span> </div> </div> </span> </script> <script type="text/html" id="filter-container"> <% if (!_.isEmpty(filters)) { %> <div class="filter-box oro-clearfix-width"> <div class="filter-container"> <select data-action="add-filter-select" multiple> <% _.each(filters, function (filter, name) { %> <% if (filter.visible) { %> <option title="<%- _.escape(filter.label) %>" value="<%- name %>" <% if (filter.enabled) { %>selected<% } %>> <%- filter.label %> </option> <% } %> <% }); %> </select> <span class="filter-items"></span> <div class="filter-items-hint"> <a class="reset-filter-button" href="javascript:void(0);">Clear All Filters</a> </div> </div> </div> <% } %> </script> <script id="widget-items-item-select-template" type="text/template"> <div class="pull-left items-selector-widget"> <select class="item-select filter-select-oro"> <option></option> <% items.each(function (item) { %> <option value="<%= item.get('id') %>"><%= item.get('label') %></option> <% }); %> </select> </div> </script> <script id="widget-items-item-template" type="text/template"> <tr data-cid="<%= cid %>"> <td><%= label %></td> <td class="action-cell"> <input type="hidden" name="<%= namePrefix %>[id]" value="<%= id %>"> <input data-name="order" type="hidden" class="order" name="<%= namePrefix %>[order]" value="<%= order %>"> <input class="hide" data-name="show" type="checkbox" name="<%= namePrefix %>[show]" <%= show ? 'checked' : '' %>> <% if (_.isMobile()) { %> <span class="btn delete-button" data-collection-action="delete" title="Move column up"> <i class="fa-trash-o hide-text"></i> </span> <span class="btn move-up<% if (isFirst) { %> disabled<% } %>" data-collection-action="moveUp" title="Move column up"> <i class="fa-chevron-up"></i> </span> <span class="btn move-down<% if (isLast) { %> disabled<% } %>" data-collection-action="moveDown" title="Move column down"> <i class="fa-chevron-down"></i> </span> <% } else { %> <a href="javascript: void(0);" class="action no-hash delete-button" title="Delete column" data-collection-action="delete"> <i class="fa-trash-o hide-text"></i> </a> <span title="Move column"> <i class="fa-arrows-v handle"></i> </span> <% } %> </td> </tr> </script> <script type="text/template" id="product-price-filter-template"> <div class="product-price-filter"> <span class="product-price-unit-filter-separator"><%- _.__("oro.pricing.filter.product_price.per") %></span> <div class="btn-group btn-block product-price-unit-filter"> <button class="btn dropdown-toggle" data-toggle="dropdown"> <%- selectedChoiceLabel %><span class="caret"></span> </button> <ul class="dropdown-menu" data-name="unit"> <% _.each(choices, function (option) { %> <li<% if (selectedChoice == option.value) { %> class="active"<% } %>> <a class="dropdown-item choice-value" href="#" data-value="<%= option.value %>"><%- option.label %></a> </li> <% }); %> </ul> <input type="hidden" name="unit" id="unit" value="<%= selectedChoice %>"/> </div> </div> </script> <script type="text/template" id="product-prices-tier-button-template"> <div class="product-tier-prices"> <i class="fa-bars" data-toggle="popover" data-placement="bottom" data-close="false"></i> </div> </script> <script type="text/template" id="product-prices-tier-table-template"> <table class="product-tier-prices-table"> <% if (clickable) { %> <tr> <td colspan="2"> <%= _.__('oro.pricing.click_to_select') %> </td> </tr> <% } %> <% _.each(prices, function(unitPrices, unit) { %> <tr> <td colspan="2"> <b><%= _.__('oro.product.product_unit.' + unit + '.label.full') %></b> </td> </tr> <% _.each(unitPrices, function(price) { %> <tr class="<% if (!_.isEmpty(matchedPrice) && unit === matchedPrice.unit && parseFloat(price.price) === parseFloat(matchedPrice.price)) { %>matched-tier-price<% } %>"> <td><div class="text-right"><%= price.quantity %>:</div></td> <td> <div class="text-left"> <% if (clickable) { %> <a href="javascript: void(0);" data-price="<%= parseFloat(price.price) %>" data-unit="<%= unit %>" ><%= formatter.formatCurrency(price.price, price.currency) %></a> <% } else { %> <%= formatter.formatCurrency(price.price, price.currency) %> <% } %> </div> </td> </tr> <% }) %> <% }) %> </table> </script> <script type="text/template" id="product-prices-price-overridden-template"> <div class="product-price-overridden" style="display: none;"> <i class="fa-exclamation-circle" data-toggle="popover" data-placement="bottom" data-close="false" data-content="<p><%= _.__('oro.pricing.product_prices.price_is_overridden') %></p><p><a href='javascript: void(0);'><%= _.__('oro.pricing.product_prices.reset_price') %></a></p>"></i> </div> </script> <script type="text/html" id="totals-template"> <div class="control-group"> <label class="control-label"><%= item.label %></label> <div class="controls"> <label class="control-label"><%= item.formattedAmount %></label> </div> <% if (item.formattedBaseAmount) { %> <div class="total-base-currency-wrapper"> <label class="control-label"></label> <div class="controls"> <label class="control-label"><%= item.formattedBaseAmount %></label> </div> </div> <% } %> </div> </script> <script type="text/html" id="totals-template-no-data"> <div class="no-data"> <span>No data</span> </div> </script> <script type="text/template" id="order-notes-widget"> <div class="notes-widget"> <div class="notes-widget-preview"></div> <div class="notes-widget-edit"></div> <a class="notes-widget-edit-btn" href="javascript: void(0);"><%= _.__('oro.order.notes_widget.edit') %></a> <a class="notes-widget-add-btn" href="javascript: void(0);"><%= _.__('oro.order.notes_widget.add') %></a> <a class="notes-widget-remove-btn" href="javascript: void(0);"><%= _.__('oro.order.notes_widget.remove') %></a> </div> </script> <script type="text/html" id="order-taxes-totals-template"> <div class="control-group"> <label class="control-label"><%= item.label %></label> <div class="controls"> <label class="control-label" data-toggle="collapse" data-target="#order-taxes-totals-table"> <%= item.formattedAmount %> </label> </div> </div> <% var collapseIn = _.defaults(item.data.in, true); %> <div class="collapse<%= collapseIn ? ' in' : '' %>" id="order-taxes-totals-table"> <div class="controls"> <% var total = item.data.total %> <% var shipping = item.data.shipping %> <% var translations = { unit: 'Unit Price', row: 'Row Total', total: 'Total', shipping: 'Shipping'} %> <% var unit = unit; %> <% var row = row; %> <% var total = total; %> <% var shipping = shipping; %> <% var object = {unit: unit, row: row, shipping: shipping, total: total}; %> <% var data = _.pick(object, _.identity); %> <% if (data) { %> <table class="grid table table-condensed table-bordered tax-result-grid"> <thead> <tr> <th class="renderable"></th> <th class="renderable">Incl. Tax</th> <th class="renderable">Excl. Tax</th> <th class="renderable">Tax Amount</th> </tr> </thead> <tbody> <% _.each(data, function(item, key) { %> <tr> <td class="renderable"><%= translations[key] %></td> <td class="renderable"><%= item.includingTax %></td> <td class="renderable"><%= item.excludingTax %></td> <td class="renderable"><%= item.taxAmount %></td> </tr> <% }); %> </tbody> </table> <% } %> SOURCE; $text = 'There was an error performing the requested operation. Please try again or contact us for assistance.'; $actual = preg_replace('/\s+/u', ' ', $actual); $regex = '/'.preg_quote($text, '/').'/ui'; $message = sprintf('The text "%s" appears in the text of this page, but it should not.', $text); var_dump(!preg_match($regex, $actual));
based on EXJUV
Output for 5.6.0 - 5.6.30, hhvm-3.12.14 - 3.17.3, 7.0.0 - 7.3.0beta1
bool(true)