Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83351 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 13112 invoked from network); 20 Feb 2015 19:48:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Feb 2015 19:48:19 -0000 Authentication-Results: pb1.pair.com header.from=php@tutteli.ch; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=php@tutteli.ch; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain tutteli.ch designates 80.74.154.78 as permitted sender) X-PHP-List-Original-Sender: php@tutteli.ch X-Host-Fingerprint: 80.74.154.78 ns73.kreativmedia.ch Linux 2.6 Received: from [80.74.154.78] ([80.74.154.78:48266] helo=hyperion.kreativmedia.ch) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3C/60-14173-08F87E45 for ; Fri, 20 Feb 2015 14:48:18 -0500 Received: (qmail 6913 invoked from network); 20 Feb 2015 20:48:12 +0100 Received: from cm135-167.liwest.at (HELO RoLaptop) (81.10.135.167) by ns73.kreativmedia.ch with ESMTPSA (AES256-SHA encrypted, authenticated); 20 Feb 2015 20:48:12 +0100 To: "'Dmitry Stogov'" , "'Anthony Ferrara'" Cc: References: <011801d04a07$83ab1c00$8b015400$@php.net> <016f01d04a3a$e9183220$bb489660$@php.net> <022801d04ab1$4a0c47d0$de24d770$@php.net> <1913e09d7f52541901d8574d2080a63f@mail.gmail.com> <7a5d96b34b98ec1f3ee17be7fa6a1e81@mail.gmail.com> <2CBDEB67-3DE3-437D-9AF3-0E6A92027244@zend.com> <4cc0c81c7199a452534bb8edcdb19914@mail.gmail.com> <54E589F6.9030002@garfieldtech.com> <54E66569.8000709@garfieldtech.com> In-Reply-To: Date: Fri, 20 Feb 2015 20:48:08 +0100 Message-ID: <012001d04d46$271dac90$755905b0$@tutteli.ch> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQGD0sLDaA+/0NIeBlQhQC5OtPA/xwHih9+6AanvcsEBj7eMCwEU0CpMAs0H7+gBDwGZjwJNu28fAX8sxVQAox2RWwKtsa6+Ap7Ai84CNkZj6gJ0jMndAd8n3MgBp3GfaALFVDbFAc1QaI8BsgB0mgIa4BWEAcb8ECMCdKBdgQEjFuQBnEUZa7A= Content-Language: de-ch Subject: AW: [PHP-DEV] Reviving scalar type hints From: php@tutteli.ch ("Robert Stoll") Hi Dmitry and Anthony, I was skimming through your conversation about JIT/AOT and that type = hints would allow to optimise few things. I do not know if you are aware of the following but type hints can be = passed by. Hence neither weak or strict type hints allow to predict the = type (even if only locally): function handler($errno, $errstr, $errfile, $errline){ return true; } set_error_handler("handler"); class Foo{} function foo(int $x, Foo $f){ var_dump($x, $f);=20 $y =3D $x; //should be int as well, right? } foo(new Foo(), 1); Sure, this is something which is hopefully never ever done but anyway, a = language needs to be able to handle all cases.=20 As a side notice, if the exceptions in the engine RFC is accepted, then = this would not be a problem anymore: https://wiki.php.net/rfc/engine_exceptions_for_php7 Personally, I would expect that the execution is stopped after the = error_handler was called (after user was able to log etc.) - at least = in strict mode. Cheers, Robert=20