- var_dump: documentation ( source)
- preg_match_all: documentation ( source)
<?php
$parsing_regex_arguments = '`"((?:\\"|[^"])+)"`';
$test = 'arg1 arg2 "arg3" "test \"2\"" arg4';
$matches = array();
preg_match_all($parsing_regex_arguments, $test, $matches);
var_dump($matches);