3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php preg_match_all('/("|\') ([^"\']+?) \1 /x', "dfgfdgdfsg'dfsg'dfsg'dfsgdf'g'dfg'fdg'rt'dfg", $m); var_dump($m);
Output for 4.3.0 - 7.1.0
array(3) { [0]=> array(4) { [0]=> string(6) "'dfsg'" [1]=> string(8) "'dfsgdf'" [2]=> string(5) "'dfg'" [3]=> string(4) "'rt'" } [1]=> array(4) { [0]=> string(1) "'" [1]=> string(1) "'" [2]=> string(1) "'" [3]=> string(1) "'" } [2]=> array(4) { [0]=> string(4) "dfsg" [1]=> string(6) "dfsgdf" [2]=> string(3) "dfg" [3]=> string(2) "rt" } }