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.

Comments ( 0 )

    Leave A Comment

    Your email address will not be published. Required fields are marked *