Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83550 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 6768 invoked from network); 23 Feb 2015 08:27:34 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Feb 2015 08:27:34 -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:50541] helo=hyperion.kreativmedia.ch) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 16/C7-01128-374EAE45 for ; Mon, 23 Feb 2015 03:27:33 -0500 Received: (qmail 26227 invoked from network); 23 Feb 2015 09:27:27 +0100 Received: from cm135-167.liwest.at (HELO RoLaptop) (81.10.135.167) by ns73.kreativmedia.ch with ESMTPSA (AES256-SHA encrypted, authenticated); 23 Feb 2015 09:27:27 +0100 To: "'PHP internals'" References: <2e4694f9805ee81ea0b2c79eab06c2d6@mail.gmail.com> <54EA5EDA.8010605@gmail.com> <54EA6A99.5010609@gmail.com> <54EA7F15.9030606@gmail.com> <54EA891B.6030405@gmail.com> <09b9ee836c04b1750614a91bd39a5bed@mail.gmail.com> <54EA97A2.4010701@gmail.com> In-Reply-To: Date: Mon, 23 Feb 2015 09:27:26 +0100 Message-ID: <003901d04f42$8ec315d0$ac494170$@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: AQIDXD7ehmaYKzbAddTs7O1sB4MzmgIw+OLdAe4e2iYCibfnDQEmdWqtAiDZcfAB4cR2SQJXxpD6Ais01rQBOuFyBwIXH55km/qTJxA= Content-Language: de-ch Subject: AW: [PHP-DEV] JIT (was RE: [PHP-DEV] Coercive Scalar Type Hints RFC) From: php@tutteli.ch ("Robert Stoll") Hey all, tl;dr Just one point which JIT/AOT people should consider when dealing with = PHP. PHP is highly dynamic and there are enough use cases which makes it = impossible for a static analyser to infer types accurately without using = a top type like mixed. How would you deal with variable function calls, variable variables, = reflection, dynamic includes etc. Your inferred types would simply be wrong without using mixed. Consider = the following function foo(int $a){} $a =3D 1; //can be int for sure right? $b =3D "a"; $$b =3D "h"; //oh no, your generated code would crash foo($a); =20 Maybe I am wrong and there is a possibility, if so, please let me know, = would be interesting to know. Cheers, Robert