Hi,

This is not a question of namespace resolution. Built-in type hints and 
namespaces have nothing in common.

It is just about the logic of :

Class resource {
...
}

Function foo(resource $arg, ...)

Do we check $arg to be I_RESOURCE or an instance of the 'resource' class ?

Hope I'm clear.

> -----Message d'origine-----
> De : Dennis Birkholz [mailto:den...@birkholz.biz]
> Envoyé : vendredi 20 février 2015 20:17
> À : internals@lists.php.net
> Objet : Re: [PHP-DEV] [RFC] Reserve EVEN MORE types for PHP7
> 
> Am 20.02.2015 um 19:51 schrieb Markus Fischer:
> > From the RFC:
> >
> >     “resource”
> >     “object”
> >     “scalar”
> >     “mixed”
> >     “numeric”
> >
> > "... prohibits their usage as class, interface and trait names."
> >
> > This is such a major BC break.
> 
> I just wonder why we need to prohibit these names. Can types not reside
> in the global \ namespace? We could then change the class resolution
> rules to allow to look also in \ as is done for functions currently.
> 
> Thanks
> Dennis
> 
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php


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

Reply via email to