THE BLOG

06
Jun

PHP?

After today’s Daily WTF, I discovered this:

griff:~ $ php -a
Interactive mode enabled

<?php
var_dump("php" == 0);
var_dump("php" == true);
var_dump(0 == true);
?>
bool(true)
bool(true)
bool(false)

PHP’s type casting is fantastic, isn’t it.