Quick PHP note:
Feb. 13th, 2008 04:03 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
When comparing an expression with a bool, PHP does not perform type widening, but treats it as evaluation of a Boolean expression.
// true: print_r((true == 8) ? 'true' : 'false'); // false: print_r(((int)true == 8) ? 'true' : 'false');