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:
102.47 ms | 409 KiB | 6 Q