3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = ' My text1 My text2 My text3 '; var_export( preg_split('/\R+/', $string, 0, PREG_SPLIT_NO_EMPTY) );

preferences:
25.09 ms | 405 KiB | 5 Q