How does PHP handle large arrays passed to functions in terms of memory usage and performance?

When passing large arrays to functions in PHP, memory usage can become a concern as the entire array is copied into memory. To optimize memory usage and performance, you can pass the array by reference using the `&` symbol in the function parameter declaration. This way, the function directly operates on the original array without creating a copy.

// Passing large array by reference to optimize memory usage and performance
function processArrayByReference(&$array) {
    // Function logic to operate on the array directly
}

// Example usage
$largeArray = range(1, 1000000); // Creating a large array
processArrayByReference($largeArray);