3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'Hello how are you<br>Foo bar hello'; $array = preg_split( '/(?:(?<=\s)\s*)|(<br>)/', $str, -1, PREG_SPLIT_DELIM_CAPTURE); var_dump( $array);

preferences:
44.33 ms | 402 KiB | 5 Q