3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = [ '', 'nothing here', 'something<snip>here', false, 0, null, ]; foreach( $data as $text ) { $textarr = preg_split( '/(<.*>)/U', $text, -1, PREG_SPLIT_DELIM_CAPTURE ); var_dump($textarr); }

preferences:
56.55 ms | 405 KiB | 5 Q