3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $parsing_regex_arguments = '`"((?:\\"|[^"])+)"`'; $test = 'arg1 arg2 "arg3" "test \"2\"" arg4'; $matches = array(); preg_match_all($parsing_regex_arguments, $test, $matches); var_dump($matches);
based on VLi1N
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.3.0alpha1
array(2) { [0]=> array(1) { [0]=> string(19) ""arg3" "test \"2\""" } [1]=> array(1) { [0]=> string(17) "arg3" "test \"2\"" } }