3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $str = 'CustomLog logs/access_log "%h %l %u %t \"%r\" %>s %b" \'lol wtf\''; preg_match_all('/"[^"\\\\]*(?:\\\\.[^"\\\\]*)*"|\'[^\'\\\\]*(?:\\\\.[^\'\\\\]*)*\'/', $str, $matches); var_dump($matches);
based on efRgl
Output for 4.3.0 - 7.2.0
array(1) { [0]=> array(2) { [0]=> string(27) ""%h %l %u %t \"%r\" %>s %b"" [1]=> string(9) "'lol wtf'" } }