3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $headers = "Content-Type: foo/bar\r\n\r\nHost: foo.com\r\n"; print_r(preg_split('/[\r\n]+(?=\S)/', trim($headers), -1, PREG_SPLIT_NO_EMPTY));
Output for 4.3.0 - 7.1.0
Array ( [0] => Content-Type: foo/bar [1] => Host: foo.com )