3v4l.org

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

preferences:
41.95 ms | 1387 KiB | 5 Q