3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php preg_match_all('/("|\') \b ([^"\']+) \b /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(8) { [0]=> string(4) "'111" [1]=> string(5) "'dfsg" [2]=> string(4) "'222" [3]=> string(2) "'g" [4]=> string(4) "'333" [5]=> string(4) "'fdg" [6]=> string(3) "'44" [7]=> string(4) "'dfg" } [1]=> array(8) { [0]=> string(1) "'" [1]=> string(1) "'" [2]=> string(1) "'" [3]=> string(1) "'" [4]=> string(1) "'" [5]=> string(1) "'" [6]=> string(1) "'" [7]=> string(1) "'" } [2]=> array(8) { [0]=> string(3) "111" [1]=> string(4) "dfsg" [2]=> string(3) "222" [3]=> string(1) "g" [4]=> string(3) "333" [5]=> string(3) "fdg" [6]=> string(2) "44" [7]=> string(3) "dfg" } }