Voting

: max(four, two)?
(Example: nine)

The Note You're Voting On

Hayley Watson
7 years ago
As for the other "compare function" callbacks, the return value from the callback function doesn't need to be -1, 0, or 1.

cmp($a,$b) just needs to be <0, =0, or >0 depending on whether $a<$b, $a=$b, or $a>$b.

<< Back to user notes page

To Top