<?php

$string = 'command run --first-arg="something here" --second-arg="something here" --last-arg';
print_r(preg_split('/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/', $string));