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 = 1;  //can be int for sure right?
$b = "a";
$$b = "h"; //oh no, your generated code would crash
foo($a);
 
Maybe I am wrong and there is a possibility, if so, please let me know, would 
be interesting to know.

Cheers,
Robert


--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to