3v4l.org

run code in 300+ PHP versions simultaneously
<?php $note = "センター断裁\\r\\n工場出力不可"; $arr_note = str_replace(array('\r\n', '\r'),'\n', $note); $arr_note = explode('\n', $arr_note); print_r( $note ); print_r( $arr_note );
Output for 8.2.0 - 8.2.29, 8.3.0 - 8.3.25, 8.4.1 - 8.4.12
センター断裁\r\n工場出力不可Array ( [0] => センター断裁 [1] => 工場出力不可 )

preferences:
45.41 ms | 406 KiB | 5 Q