Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:60508 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 96472 invoked from network); 7 May 2012 12:23:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 May 2012 12:23:53 -0000 Authentication-Results: pb1.pair.com header.from=hartmut.holzgraefe@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=hartmut.holzgraefe@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.42 as permitted sender) X-PHP-List-Original-Sender: hartmut.holzgraefe@gmail.com X-Host-Fingerprint: 209.85.214.42 mail-bk0-f42.google.com Received: from [209.85.214.42] ([209.85.214.42:42758] helo=mail-bk0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FB/30-29115-9DEB7AF4 for ; Mon, 07 May 2012 08:23:53 -0400 Received: by bkcik5 with SMTP id ik5so3913093bkc.29 for ; Mon, 07 May 2012 05:23:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; bh=n/iNrpV4BNq1IKpo6Dt7sq6yBOmXvIeMMu8IjnEF/XM=; b=LYlZ2JDM1AkuIeSpwyuTRtgDroY99RPC14AXsS99pzs77YbjhdwV0q+tJY9fQGl5kT IZ3BGmSjrnTcF5u4GPzfDpObndOONDaTyNUOT/8ckLPDFEzr/ajv0cyZG5YAiJFZoByT oAB6Pz4D5QrGXg7QxI05a9T4FrPgBBUc2cDJmHJuLv8wMihPX3hnA2+6t6MQPd2tSbKy QTO81lRnxQ7d+DJE3e1lQcz0So9BlPJn+2Dq/AZmB/PKlwobyzi4ExUuo3ZWOOk/Uawz K8U9J4Ebl9aYzDjpeYMTIU6++gS/TqNA6VftlocQZxIiFwLLkFO0W+MxlnHE+xtj8ZAI EwYw== Received: by 10.204.152.75 with SMTP id f11mr5532948bkw.136.1336393430020; Mon, 07 May 2012 05:23:50 -0700 (PDT) Received: from [192.168.23.15] (212.100.42.202.fixip.bitel.net. [212.100.42.202]) by mx.google.com with ESMTPS id 9sm8380825bku.9.2012.05.07.05.23.48 (version=SSLv3 cipher=OTHER); Mon, 07 May 2012 05:23:49 -0700 (PDT) Message-ID: <4FA7BEDA.6080504@gmail.com> Date: Mon, 07 May 2012 14:23:54 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1 MIME-Version: 1.0 To: internals@lists.php.net References: <4F847B8A.9010007@sugarcrm.com> <733bc8ea59cf6737563a62886e92fcb6.squirrel@www.l-i-e.com> In-Reply-To: X-Enigmail-Version: 1.4.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [off] PHP: a fractal of bad design From: hartmut.holzgraefe@gmail.com (Hartmut Holzgraefe) On 05/07/2012 09:28 AM, Arvids Godjuks wrote: > Hello internals, > > I should voice my opinion that such things like comparing two strings > starting with numbers and that they resolve to actual integer/float for > comparation is bad, really bad. That just defies the logic and yealds > absolutly unexpected results. I pride myself that i know the juggling rules > well, but I'm shocked by this to say the least.. you have to see this in the "web context" where all input from a HTTP client arrives as strings without type information (and some database result data comes in as string data, too) In that context it perfectly makes sense that "1" == "1.0" returns true even if both operands are strings. "123ABF453..." == "123DFEABC..." is a different story though, and guess what? These are *not* considered equal, at least not by the 5.3.6 instance on the system i'm currently testing with: will print "no, you don't get in *that* easy!" just fine -- hartmut