Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:21240 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 4873 invoked by uid 1010); 15 Dec 2005 21:23:31 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 4858 invoked from network); 15 Dec 2005 21:23:30 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Dec 2005 21:23:30 -0000 X-Host-Fingerprint: 80.91.229.2 main.gmane.org Linux 2.5 (sometimes 2.4) (4) Received: from ([80.91.229.2:34622] helo=ciao.gmane.org) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 42/F9-23096-0DED1A34 for ; Thu, 15 Dec 2005 16:23:29 -0500 Received: from root by ciao.gmane.org with local (Exim 4.43) id 1En0XW-0000BU-Iq for internals@lists.php.net; Thu, 15 Dec 2005 22:21:26 +0100 Received: from bos-nat1.smarterliving.net ([65.112.23.131]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 15 Dec 2005 22:21:26 +0100 Received: from rabbitt by bos-nat1.smarterliving.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 15 Dec 2005 22:21:26 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: internals@lists.php.net Date: Thu, 15 Dec 2005 15:17:40 -0500 Lines: 17 Message-ID: References: <43A0F0BB.6080009@chiaraquartet.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: bos-nat1.smarterliving.net User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050729) X-Accept-Language: en-us, en In-Reply-To: <43A0F0BB.6080009@chiaraquartet.net> Sender: news Subject: Re: [PHP-DEV] why is '01' == '1.'? From: rabbitt@xaraya.com ("Carl P. Corliss") Greg Beaver wrote: > Hi all, > > I realize that 1 == '01' and 1 == '1.', but why is this next code also > bool(true)? > > 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