3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $var = <<<DATA This is "some data" with some "quoted \"strings" DATA; $expr = '/"((?:[^"\\\\]|\\\\.)*)"/'; var_dump(preg_split($expr, $var, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE));
based on UqMMC
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
array(4) { [0]=> string(8) "This is " [1]=> string(9) "some data" [2]=> string(11) " with some " [3]=> string(16) "quoted \"strings" }