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

From: Date: Thu, 15 Dec 2005 17:19:04 +0000
Subject: Re: why is '01' == '1.'?
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-21236@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'); > ?> > That is pure logic... a == b and a == c implies by the rules of logic that b == c -- Hans avast! Antivirus: Outbound message clean. Virus Database (VPS): 0550-3, 15/12/2005 Tested on: 15/12/2005 18:19:04 avast! - copyright (c) 1988-2005 ALWIL Software. http://www.avast.com

« previous php.internals (#21236) next »