Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:75445 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 55052 invoked from network); 14 Jul 2014 12:47:36 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Jul 2014 12:47:36 -0000 Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.172 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 209.85.212.172 mail-wi0-f172.google.com Received: from [209.85.212.172] ([209.85.212.172:35154] helo=mail-wi0-f172.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FA/D1-43645-861D3C35 for ; Mon, 14 Jul 2014 08:47:36 -0400 Received: by mail-wi0-f172.google.com with SMTP id n3so2466129wiv.11 for ; Mon, 14 Jul 2014 05:47:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=OhmKQF1Ets+UBEHtSg0xCF/Gi+2uDgueB0fWnr2ZSL4=; b=HzXZxqWq4/YOOlEIIs3LWlqUf+AIMNW8PrQ+Nunpe5GYHMRpAD9u06B1Vxkt7Cn2Cg 95bzD6tQzrxPlvXWO5HrR5I4WZeXGJ4gddFeT6ImAOgGgZ1ohLpkCn+UuUZmZQV3GhIp ewsdp3LYqBwwc81rN8L3l7xh78RxHQJrrWlp5VPuPKI2b14gYU8CmyLXqW2ypl+AdjRX X3WrhUKHBhxBylceEsjUBVZUiZ+57Dj2610Im6eGDiBqZtkfZNY7FIhddydJDYWu+Co8 IgtT53r/clbjOM7rN/kV8+UFngTyys2CUFqvSip3QEF6YHGNBM+LB/rxBtwjULeCbLzE P9tQ== X-Received: by 10.180.87.161 with SMTP id az1mr24787229wib.63.1405342051489; Mon, 14 Jul 2014 05:47:31 -0700 (PDT) Received: from [192.168.0.139] ([62.189.198.114]) by mx.google.com with ESMTPSA id x3sm30848769wia.11.2014.07.14.05.47.30 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 14 Jul 2014 05:47:30 -0700 (PDT) Message-ID: <53C3D0EF.5030303@gmail.com> Date: Mon, 14 Jul 2014 13:45:35 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: internals@lists.php.net References: <08503591-EFC8-48E6-984E-FFC292C5EA5F@ajf.me> <53C2178E.7070705@sugarcrm.com> <53C24061.6050503@lsces.co.uk> <20140713101840.GR6540@phcomp.co.uk> <20140714123556.GH6540@phcomp.co.uk> In-Reply-To: <20140714123556.GH6540@phcomp.co.uk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] Scalar Type Hinting With Casts (re-opening) From: rowan.collins@gmail.com (Rowan Collins) Alain Williams wrote (on 14/07/2014): > This sort of error should be picked up the first time that the script is > compiled, it does not need to be executed (other than conditional includes). > This means that these errors will be picked up very quickly. So, it doesn't need to be executed ... except when it does (I can think of a few other cases where it's non-trivial to write a compile-time check). There are plenty of static analysis tools which will pick up this kind of thing, but if you want a language with strict compile-time checks, use Hack, which eliminates certain dynamic PHP features in order to make stronger guarantees. Regards, -- Rowan Collins [IMSoP]