Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77170 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 92515 invoked from network); 14 Sep 2014 00:10:29 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Sep 2014 00:10:29 -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:57568] helo=imap10-3.ox.privateemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3A/3E-27276-4FCD4145 for ; Sat, 13 Sep 2014 20:10:28 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.privateemail.com (Postfix) with ESMTP id 701012400D4; Sat, 13 Sep 2014 20:10:25 -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 qppzTNIIsuE1; Sat, 13 Sep 2014 20:10:25 -0400 (EDT) Received: from oa-res-27-90.wireless.abdn.ac.uk (oa-res-27-90.wireless.abdn.ac.uk [137.50.27.90]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.privateemail.com (Postfix) with ESMTPSA id 7592A2400D1; Sat, 13 Sep 2014 20:10:24 -0400 (EDT) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) In-Reply-To: <20140914000718.GB14312@phcomp.co.uk> Date: Sun, 14 Sep 2014 01:10:20 +0100 Cc: internals@lists.php.net Content-Transfer-Encoding: quoted-printable Message-ID: <3177B936-50C1-4E5D-8687-FD235C72B411@ajf.me> References: <6893A97A-EC4C-4124-B804-96E2A26B953F@ajf.me> <20140914000718.GB14312@phcomp.co.uk> To: Alain Williams X-Mailer: Apple Mail (2.1878.6) Subject: Re: [PHP-DEV] [VOTE][RFC] Scalar Type Hinting with Cast From: ajf@ajf.me (Andrea Faulds) On 14 Sep 2014, at 01:07, Alain Williams wrote: > You give an option for float to int casting to truncate. Where? oa-res-27-90:php-src ajf$ sapi/cli/php -r 'function foobar(int $a) { = var_dump($a); } foobar(1.5);' =20 Catchable fatal error: Argument 1 passed to foobar() must be of the = type int, float given, called in Command line code on line 1 and defined = in Command line code on line 1 If you mean under possible changes, it=92s not a change that=92s been = made. It=92d only be worth discussing within the context of making it = truncate or round. -- Andrea Faulds http://ajf.me/