3v4l.org

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