3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php //$bigKml = "<br><img src='files/bagel.png'><br><br>"; //$pattern = '/<img src=.*?>/'; //preg_match($pattern, $bigKml, $imageTags); //print_r($imageTags); //foreach($imageTags as $imageTag) { // $urlPattern = "'.*'"; // preg_match($urlPattern, $imageTag, $oldUrls); // $oldUrl = $oldUrls[0]; // print_r($oldUrl); //} $bigKml = "<br><img src='files/bagel.png'><br><br>"; $pattern = "'.*?'"; preg_match($pattern, $bigKml, $imageTags); print_r($imageTags); ?>
Output for 5.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
/'; //preg_match($pattern, $bigKml, $imageTags); //print_r($imageTags); //foreach($imageTags as $imageTag) { // $urlPattern = "'.*'"; // preg_match($urlPattern, $imageTag, $oldUrls); // $oldUrl = $oldUrls[0]; // print_r($oldUrl); //} $bigKml = "<br><img src='files/bagel.png'><br><br>"; $pattern = "'.*?'"; preg_match($pattern, $bigKml, $imageTags); print_r($imageTags); ?>