Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:75710 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 46278 invoked from network); 20 Jul 2014 13:13:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Jul 2014 13:13:39 -0000 Authentication-Results: pb1.pair.com header.from=ajf@ajf.me; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ajf@ajf.me; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ajf.me designates 192.64.116.216 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 192.64.116.216 imap10-3.ox.privateemail.com Received: from [192.64.116.216] ([192.64.116.216:42294] helo=imap10-3.ox.privateemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 07/12-36040-280CBC35 for ; Sun, 20 Jul 2014 09:13:38 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.privateemail.com (Postfix) with ESMTP id 6428E2400D1; Sun, 20 Jul 2014 09:13:35 -0400 (EDT) X-Virus-Scanned: Debian amavisd-new at imap10.ox.privateemail.com Received: from mail.privateemail.com ([127.0.0.1]) by localhost (imap10.ox.privateemail.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id ETPeRED2MuQJ; Sun, 20 Jul 2014 09:13:35 -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 57D1C2400C6; Sun, 20 Jul 2014 09:13:34 -0400 (EDT) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) In-Reply-To: <5B708D89-B208-4644-BC89-1B7AE98A99BA@ajf.me> Date: Sun, 20 Jul 2014 14:13:31 +0100 Cc: "internals@lists.php.net" Content-Transfer-Encoding: quoted-printable Message-ID: <09DA424D-9A3B-485F-B812-3F07B52B0CFA@ajf.me> References: <20A80B2E-42BB-486F-8F83-A6FDBEBA4056@ajf.me> <5B708D89-B208-4644-BC89-1B7AE98A99BA@ajf.me> To: Theodore Brown 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 20 Jul 2014, at 14:11, Andrea Faulds wrote: > double Did I just say double? I meant float, of course. :) The patch actually warns you if you try to do this now: function foo(double $foo) {} foo(1.0); If you use one of the non-existent aliases (double), and pass the type = that alias is supposed to hint for (a float), the error message notes = you might be looking for the actual type hint (`float`). The same for integer and boolean (only int and bool, respectively, are = permitted). -- Andrea Faulds http://ajf.me/