Hi Andrea,

> -----Original Message-----
> From: Andrea Faulds [mailto:a...@ajf.me]
> Sent: Thursday, November 26, 2015 12:47 AM
> To: internals@lists.php.net
> Subject: Re: [PHP-DEV] Re: Scalar Type Declaration Syntax Weirdness
> 
> Hi Anatol,
> 
> Anatol Belski wrote:
> >>
> >> It may not be documented, but that doesn't put it outside the scope of BC.
> >> People will unintentionally rely on bugs.
> >>
> > What is the reason to use \int if "class \int{}" is prohibited? A typo :) ?
> 
> It might be used deliberately since some IDEs (PHPStorm in particular) can't
> handle PHP 7's scalar type hints properly in namespaces yet.
> 
Hm, but then it's a bug in PHPStorm for PHP7 support, not in PHP? Particularly 
I've found this amusing thread https://devnet.jetbrains.com/message/5507875 . 
Even PHPStorm would insert \int, it'll then complain that there's no such 
class, and it'll complain about the doc blocks, and passing int instead of \int 
object. So an IDE will really need to be PHP 7 compatible.

Also, the basic situation is even worse, any code ported to PHP7 and using type 
hints is potentially already broken. With this patch available on the day zero, 
those codes won't work. We know that this fix is necessary and can't be 
avoided, so putting it into somewhere after day zero - the broken PHP codes 
will work with .0 and there will be a gap to fix them till next PHP release.

Regards

Anatol 


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

Reply via email to