RE: [PHP-DEV] [RFC] Reserve EVEN MORE types for PHP7
| From: | François Laupretre | Date: | Fri, 20 Feb 2015 21:03:57 +0000 |
| Subject: | RE: [PHP-DEV] [RFC] Reserve EVEN MORE types for PHP7 | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-83355@lists.php.net to get a copy of this message | ||
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:dennis@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