Hi! > No, classes are not loaded for type checks, since it would be pointless > - if the class is not loaded, you could not have a value of that type, > so if the class is not present, the answer is "no". > > > It's not true anymore, with this proposal.
This is not good. The base premise of type checks always was if you don't use them, they are basically free - you don't load the classes, you don't do any work, until you actually need them, and by then your class is supposed to be already loaded, so again it's not costly. But if just declaring a type could trigger loading of code, this may significantly increase the footprint and loading time for classes that have many options but only use some of them at the time. Also, it is kind of weird that arguments require exact match but return types do not. Not that we care for consistency anymore... -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php