What is the difference between using explode and split functions to store the content of a textarea line by line in an array in PHP?

The issue is how to store the content of a textarea line by line in an array in PHP. One way to do this is by using the explode function to split the textarea content by new line characters (\n) and store each line as an element in an array. Another way is to use the split function with a regular expression pattern to split the content by new line characters as well. Both methods achieve the same result of storing each line of the textarea content in an array.

// Using explode function
$textarea_content = $_POST['textarea_content'];
$lines_array = explode("\n", $textarea_content);

// Using split function
$textarea_content = $_POST['textarea_content'];
$lines_array = preg_split('/\r\n|\r|\n/', $textarea_content);