3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $title = array(); $thumb = array(); $string = ''; preg_match_all("/\<div class=\"merchant_info\">\s*(\<div.*?\<\/div>\s*)?(.*?)\<\/div\>/is", $res[0], $matches ); foreach($matches[0] as $titles){ $title[] = "<div class='titles' >".$titles."</div>"; } preg_match_all("/\<a class=\"thumb\"(.*?)\<\/a\>/is", $res[0], $matches); foreach($matches[0] as $thumbs){ $thumb[] = "<div class='thumbs' >".$thumbs."</div>"; } for($i = 0; $i < count($title); $i++){ $string .= $title[$i] . $thumb[$i]; } echo $string;
Output for 5.0.4 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
Notice: Undefined variable: res in /in/mjiLR on line 7 Notice: Undefined variable: res in /in/mjiLR on line 13
Output for hhvm-3.10.0

Process exited with code 153.
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: res in /in/mjiLR on line 7 Notice: Undefined variable: res in /in/mjiLR on line 13