3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $content = <<<EOF <p>为儿童与为儿童与为儿童与为儿童与为儿童与为儿童与为儿童与为儿童与为儿童与为儿童与为儿童与为儿童与为儿童与为儿童与为儿童与&nbsp;</p><p>本站的,将不会被过滤掉</p><dir class="insert-outer" contenteditable="false" res-data-id="555462"><span class="embed-card res_smzdm"><span class=" res_smzdm z-tag-brand">新锐品牌</span><span class="embed-card-logo res_smzdm "><img class="res_smzdm" src="//y.zdmimg.com/201612/04/5843975a9c1a4SZ6.jpg_a200.jpg"/></span><span class=" res_smzdm embed-card-info"><span class=" res_smzdm card-name">爆料看评论的驳回的系统消息</span><span class=" res_smzdm card-tags"><span class=" res_smzdm tag-border">美食</span><span class=" res_smzdm tag-border">湘菜</span></span><span class=" res_smzdm card-abstract"></span><span class=" res_smzdm card-controls"><span class=" res_smzdm group-data"> <em>赞</em>2</span><span class=" res_smzdm group-data"> <em>收藏</em>4</span><span class=" res_smzdm card-btn-deep">品牌官网</span><span class=" res_smzdm card-btn-light">查看详情</span></span></span></span></dir><p>&nbsp;京东的过滤掉<br/></p><p>&nbsp;</p><dir class="insert-outer" contenteditable="false" res-data-id="555463"><span class="embed-card main-site res_smzdm"><span class="embed-card-logo res_smzdm"><img class="res_smzdm" src="//qna.smzdm.com/201710/09/59db1b94d89518847.jpg_a200.jpg"/></span><span class="embed-card-info res_smzdm"><span class="card-name res_smzdm">万和(Vanward)40升双防电盾双重防护温显型电热水器E40-T4-22<strong class="price res_smzdm">499元</strong></span><span class="card-abstract res_smzdm"></span><span class="card-controls res_smzdm"><span class="mall-data res_smzdm">京东</span><span class="card-btn-deep res_smzdm">去购买</span></span></span></span></dir><p>&nbsp;<br/></p><p><img src="http://qnam.smzdm.com/201710/09/59daec1182cc73696.jpg_e600.jpg" alt="" title=""/></p><p><img src="http://qnam.smzdm.com/201710/09/59daec1182cc73696.jpg_e600.jpg" alt="" title=""/></p><p><img src="http://qnam.smzdm.com/201710/09/59daec1182cc73696.jpg_e600.jpg" alt="" title=""/></p><p><br/></p> EOF; preg_match_all('#<dir[^>]+res-data-id=\\\"(\d+)\\\"[^>]*>(.*)</dir>#iUs', $content, $result); var_dump($result);
Output for 5.6.0 - 5.6.30, hhvm-3.18.5 - 3.22.0, 7.0.0 - 7.3.0beta1
array(3) { [0]=> array(0) { } [1]=> array(0) { } [2]=> array(0) { } }