3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $string = '<a href="http://www.google.com/" class=l2>Go to Google!</a>'; preg_match_all('/<a href="([^"]+)" class=l.+?>([^<]+)<\/a>/', $string, $results); var_dump( $results);
Output for 4.3.0 - 7.1.0
array(3) { [0]=> array(1) { [0]=> string(59) "<a href="http://www.google.com/" class=l2>Go to Google!</a>" } [1]=> array(1) { [0]=> string(22) "http://www.google.com/" } [2]=> array(1) { [0]=> string(13) "Go to Google!" } }