What functions or methods in PHP can be used to efficiently parse CSV data into arrays?

When working with CSV data in PHP, it is common to need to parse the data into arrays for further processing. PHP provides several functions and methods that can help efficiently parse CSV data into arrays. One commonly used function is `str_getcsv()` which can parse a CSV string into an array. Additionally, the `fgetcsv()` function can be used to read and parse CSV data from a file handle.

// Example code to parse CSV data into arrays using str_getcsv()
$csvString = "John,Doe,30\nJane,Smith,25\n";
$csvArray = array_map('str_getcsv', explode("\n", $csvString));

print_r($csvArray);