What are the potential pitfalls of inconsistent parameter order in PHP functions, specifically with strings and arrays?

Inconsistent parameter order in PHP functions can lead to errors or unexpected behavior in your code, especially when dealing with strings and arrays. To avoid this issue, it's important to always follow a consistent parameter order when calling functions that accept multiple arguments. This can help prevent confusion and make your code easier to read and maintain.

// Example of consistent parameter order when using a function that accepts a string and an array
function exampleFunction($string, $array) {
    // Function logic here
}

// Correct way to call the function
exampleFunction("Hello", [1, 2, 3]);