I'm writing a library routine, which among other things will do some rather complex sorting of nested arrays.
I see from the documentation that all the array sort function (including the ones using built-in comparators) can return false on failure - but when would this ever be the case???
It would fail when the variable you send to the function is NOT an array
Example:
asort('Hello');//fails
asort(array(1,2,35,7,2,8,3));//true
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With