On Tue, 2015-04-28 at 13:07 +0100, Rowan Collins wrote: > François Laupretre wrote on 28/04/2015 12:32: > > Bare class names are still recognized and priority is given to class names > > (if a 'String' class is defined, every 'String' or even 'string' type hints > > will always refer to it). > > This part is likely to be rather tricky to implement. How do you know if > a 'String' class is defined or not? > > The Engine would have to do something like this:
This also becomes funny with code like this: <?php function foo(String $bar) {} foo($bar); // No class Sttttring,, $bar must be native string include('some_file_which_defines_a_class_String_maybe_via_autoload_or_sth.php'); foo($bar); // Class String exists, $bar must be of that class ?> Make things as deterministic as possible. johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php