PHP: Hypertext Preprocessor (original) (raw)
`While this may seem obvious, user-defined array sorting functions ( uksort(), uasort(), usort() ) will not be called if the array does not have at least two values in it.
The following code:
Will output:
string(4) "val3"
string(4) "val2"
The first array doesn't get sent to the function.
Please, under no circumstance, place any logic that modifies values, or applies non-sorting business logic in these functions as they will not always be executed.
`