Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:75495 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 42269 invoked from network); 14 Jul 2014 17:19:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Jul 2014 17:19:31 -0000 Authentication-Results: pb1.pair.com smtp.mail=ajf@ajf.me; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ajf@ajf.me; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ajf.me designates 192.64.116.200 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 192.64.116.200 imap1-2.ox.privateemail.com Received: from [192.64.116.200] ([192.64.116.200:37035] helo=imap1-2.ox.privateemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BF/BA-25444-32114C35 for ; Mon, 14 Jul 2014 13:19:31 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.privateemail.com (Postfix) with ESMTP id 31C84B00087; Mon, 14 Jul 2014 13:19:28 -0400 (EDT) X-Virus-Scanned: Debian amavisd-new at imap1.ox.privateemail.com Received: from mail.privateemail.com ([127.0.0.1]) by localhost (imap1.ox.privateemail.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id eU6THbt53uLV; Mon, 14 Jul 2014 13:19:28 -0400 (EDT) Received: from [192.168.0.15] (unknown [90.210.122.167]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.privateemail.com (Postfix) with ESMTPSA id D26FEB00085; Mon, 14 Jul 2014 13:19:26 -0400 (EDT) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) In-Reply-To: <20140714171446.GG27743@phcomp.co.uk> Date: Mon, 14 Jul 2014 18:19:23 +0100 Cc: internals@lists.php.net Content-Transfer-Encoding: quoted-printable Message-ID: References: <08503591-EFC8-48E6-984E-FFC292C5EA5F@ajf.me> <53C3F70A.7010706@gmail.com> <3aa29e080d70c843713e19a952dfbad6@mail.gmail.com> <20140714170149.GE27743@phcomp.co.uk> <20140714171446.GG27743@phcomp.co.uk> To: Alain Williams X-Mailer: Apple Mail (2.1878.6) Subject: Re: [PHP-DEV] [RFC] Scalar Type Hinting With Casts (re-opening) From: ajf@ajf.me (Andrea Faulds) On 14 Jul 2014, at 18:14, Alain Williams wrote: > I trust that you meant 1.5 not 0.666. Er=85 yes. I somehow misread 3/2 as 2/3. > I would have expected 1 - since it appears, from the code, that $a = should only contain integers. So? PHP doesn=92t do integer division. It does what Python 3 does: if = two integers cannot divide cleanly, then a float division is done = instead. This may not be what C, C++, C#, Java, or some other = strictly-typed languages do, but it is what PHP does, and has done for a = long time. It=92s also what makes the most sense, IMO. -- Andrea Faulds http://ajf.me/