Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:75477 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 12556 invoked from network); 14 Jul 2014 15:42:05 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Jul 2014 15:42:05 -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:33376] helo=imap10-3.ox.privateemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 75/74-25444-B4AF3C35 for ; Mon, 14 Jul 2014 11:42:03 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.privateemail.com (Postfix) with ESMTP id 157BF2400C7; Mon, 14 Jul 2014 11:42:00 -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 aYrPOnEn2AeB; Mon, 14 Jul 2014 11:41:59 -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 DCB732400C6; Mon, 14 Jul 2014 11:41:58 -0400 (EDT) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) In-Reply-To: <53C3F9A7.5070002@lsces.co.uk> Date: Mon, 14 Jul 2014 16:41:54 +0100 Cc: internals@lists.php.net Content-Transfer-Encoding: quoted-printable Message-ID: <35122550-EB29-4505-91F5-9B92297075BC@ajf.me> References: <08503591-EFC8-48E6-984E-FFC292C5EA5F@ajf.me> <6C08D5C1-7A37-4F49-BF12-96B614B4B50B@ajf.me> <8c4fa132c69f0e72d1fd963461a110c6@mail.gmail.com> <53C3F9A7.5070002@lsces.co.uk> To: Lester Caine 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 16:39, Lester Caine wrote: > The irritating thing here is HAVING to add the error_handler which may > well have been installed already for other reasons ... possibly in = some > third party library to compensate for other changes? The intention is obviously that you wouldn=92t skip the = E_RECOVERABLE_ERROR, but my point was that if you really wanted to, you = could. The other type hints are strict, hence this one is too, it=92s = just tolerant of equivalent values that can be losslessly converted. If you want to pass user data safely to such a function, (int) or = (float) first is probably a good idea. -- Andrea Faulds http://ajf.me/