Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80460 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 87688 invoked from network); 14 Jan 2015 13:15:18 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Jan 2015 13:15:18 -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.199 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 192.64.116.199 imap11-2.ox.privateemail.com Received: from [192.64.116.199] ([192.64.116.199:48939] helo=imap11-2.ox.privateemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A2/70-19120-3EB66B45 for ; Wed, 14 Jan 2015 08:15:15 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.privateemail.com (Postfix) with ESMTP id B09348800A2; Wed, 14 Jan 2015 08:15:11 -0500 (EST) X-Virus-Scanned: Debian amavisd-new at imap11.ox.privateemail.com Received: from mail.privateemail.com ([127.0.0.1]) by localhost (imap11.ox.privateemail.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 3ApGkD69pWfT; Wed, 14 Jan 2015 08:15:11 -0500 (EST) Received: from oa-res-26-240.wireless.abdn.ac.uk (oa-res-26-240.wireless.abdn.ac.uk [137.50.26.240]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.privateemail.com (Postfix) with ESMTPSA id DA7048800DA; Wed, 14 Jan 2015 08:15:10 -0500 (EST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) In-Reply-To: <54B66945.2070000@nunninger.info> Date: Wed, 14 Jan 2015 13:15:07 +0000 Cc: PHP Internals List Content-Transfer-Encoding: quoted-printable Message-ID: References: <8DCD1B72-C81D-499E-B455-E4A042CD76E6@ajf.me> <4E2073DE-0951-498C-97BB-DDAC094F11FA@ajf.me> <54B6402B.1020401@nunninger.info> <77C73BB0-C124-47EC-81AB-ADDE6DAB1C60@ajf.me> <54B66945.2070000@nunninger.info> To: Thomas Nunninger X-Mailer: Apple Mail (2.1993) Subject: Re: [PHP-DEV] [RFC] Scalar Type Hints v0.2 From: ajf@ajf.me (Andrea Faulds) Hi Thomas, > On 14 Jan 2015, at 13:04, Thomas Nunninger = wrote: >=20 > Sorry, if my mail was not clear. My point was: If I write a library in = strict mode and someone else is using it from his non-strict mode, he = can pass an integer to myFunc() without an error. If I use this integer = in my library and hand it over to otherFunc() (in my library) this will = fail as integer is not accepted for float. >=20 > Or did I misunderstood the RFC and there is a casting of the integer = to a float when calling myFunc()? The value would be casted, yes. =46rom the function author=E2=80=99s = perspective, there=E2=80=99s no need to worry about strict vs. weak = typing: in both cases, you get the type you asked for. Thanks. -- Andrea Faulds http://ajf.me/