Re: why is '01' == '1.'?

From: Date: Thu, 15 Dec 2005 20:17:40 +0000
Subject: Re: why is '01' == '1.'?
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-21240@lists.php.net to get a copy of this message
Greg Beaver wrote:
Hi all, I realize that 1 == '01' and 1 == '1.', but why is this next code also bool(true)? <?php var_dump('1.' == '01'); ?>
http://us3.php.net/manual/en/language.types.string.php#language.types.string.conversion Also, if you want strict type checking, try using === .... -- Carl

« previous php.internals (#21240) next »