Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:16022 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 45672 invoked by uid 1010); 18 Apr 2005 19:51:25 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 45657 invoked from network); 18 Apr 2005 19:51:25 -0000 Received: from unknown (HELO truelight.com.tw) (127.0.0.1) by localhost with SMTP; 18 Apr 2005 19:51:25 -0000 X-Host-Fingerprint: 69.12.155.130 69-12-155-130.dsl.static.sonic.net Linux 2.4/2.6 Received: from ([69.12.155.130:2377] helo=pigeon.alphaweb.net) by pb1.pair.com (ecelerity 1.2.12rc1 r(5476:5477)) with SMTP id D8/67-18700-CBF04624 for ; Mon, 18 Apr 2005 15:51:24 -0400 Received: from localhost ([127.0.0.1] helo=peiscg33m) by pigeon.alphaweb.net with smtp (Exim 4.10) id 1DNbrp-00030H-00; Mon, 18 Apr 2005 12:25:09 -0700 Message-ID: <013a01c5444f$fc5f0d00$5c8be5a9@ohr.berkeley.edu> Reply-To: "Sara Golemon" To: Cc: References: <3c4c8fa60504181146526b0a84@mail.gmail.com><20050418185855.94161.qmail@lists.php.net> <3c4c8fa605041812285af6e888@mail.gmail.com> Date: Mon, 18 Apr 2005 12:51:17 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1478 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1478 Subject: Re: [PHP-DEV] Re: == and === From: pollita@php.net ("Sara Golemon") > > 1 > > > (nothing, false) > > > 1 > > That confuses me more (but understandable, and thank God PHP behave > this way)... I thought 'asdasd' is 0 when [implicitly] converted to > int [for comparison]? I guess I never knew PHP well :-( > That would be the 'Roughly Speaking' and 'not precisely how the engine handles it internally' parts. In the case of string to string comparison there must be at least one digit involved at the start of the string (or a plus/minus sign followed by digits, etc...) in order to qualify as a numeric string. if (int && string) convert to int if (string && int) convert to int if (string && string && both strings start with numerics) convert both to int There's also float versions of those, but... you get the picture. -Sara