Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80111 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 15102 invoked from network); 2 Jan 2015 22:19:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Jan 2015 22:19:44 -0000 Authentication-Results: pb1.pair.com header.from=sd@sven-drieling.de; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=sd@sven-drieling.de; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain sven-drieling.de from 178.77.76.68 cause and error) X-PHP-List-Original-Sender: sd@sven-drieling.de X-Host-Fingerprint: 178.77.76.68 energy.rubisco.eu Linux 2.6 Received: from [178.77.76.68] ([178.77.76.68:56233] helo=energy.rubisco.eu) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 30/81-04824-E7917A45 for ; Fri, 02 Jan 2015 17:19:43 -0500 Received: from main (dyndsl-085-016-175-252.ewe-ip-backbone.de [85.16.175.252]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by energy.rubisco.eu (Postfix) with ESMTPSA id 4DD6F11B7C002; Fri, 2 Jan 2015 23:19:39 +0100 (CET) Date: Fri, 2 Jan 2015 23:12:48 +0100 To: Zeev Suraski Cc: Andrea Faulds , PHP Internals Message-ID: <20150102231248.4e83e2bc@main> In-Reply-To: <16d442a345cf2cbd4faac6d068c57343@mail.gmail.com> References: <41D5BB0B-73AF-488E-968D-90B2878E3178@ajf.me> <16d442a345cf2cbd4faac6d068c57343@mail.gmail.com> Organization: Indy X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.23; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [RFC] Scalar Type Hints From: sd@sven-drieling.de (Sven Drieling) Am Thu, 1 Jan 2015 14:41:06 +0200 schrieb Zeev Suraski : Hallo, > =E2=80=A0 Numeric strings with trailing characters and non-numeric string= s are > accepted, but produce a notice. Why Scalar Type Hints? What is the goal? - Hints for IDEs - autocompletion? - Find bugs with static program analysis? - Find bugs at runtime? - Help improving the quality of PHP applications - with notices? - with errors? - with ...? - ...? Validation of HTML form input is strict. If I know that $_POST['age'] contains a positive integer why should foo(int $age) then able to accept float -123.42? tschuess [|8:)