3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $str = 'CustomErrorLog "/errorlog wtf" hello bvc "jjrr" hello rrgg/x^$46/ "rggg£"'; preg_match_all('/"([^"]*)"|\S+/', $str, $matches); var_dump($matches);
based on NOeBT
Output for 4.3.0 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
array(2) { [0]=> array(8) { [0]=> string(14) "CustomErrorLog" [1]=> string(15) ""/errorlog wtf"" [2]=> string(5) "hello" [3]=> string(3) "bvc" [4]=> string(6) ""jjrr"" [5]=> string(5) "hello" [6]=> string(11) "rrgg/x^$46/" [7]=> string(8) ""rggg£"" } [1]=> array(8) { [0]=> string(0) "" [1]=> string(13) "/errorlog wtf" [2]=> string(0) "" [3]=> string(0) "" [4]=> string(4) "jjrr" [5]=> string(0) "" [6]=> string(0) "" [7]=> string(6) "rggg£" } }
Output for hhvm-3.10.0

Process exited with code 153.