PHP 8.1.17 Released!

Voting

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

The Note You're Voting On

hek at theeks dot net
14 years ago
It would be useful to know the precedence (for lack of a better word) for type juggling.  This entry currently explains that "if either operand is a float, then both operands are evaluated as floats, and the result will be a float" but could (and I think should) provide a hierarchy that indicates, for instance, "between an int and a boolean, int wins; between a float and an int, float wins; between a string and a float, string wins" and so on (and don't count on my example accurately capturing the true hierarchy, as I haven't actually done the tests to figure it out).  Thanks!

<< Back to user notes page

To Top