Re: Re: Scalar Type Declaration Syntax Weirdness

From: Date: Tue, 24 Nov 2015 16:57:30 +0000
Subject: Re: Re: Scalar Type Declaration Syntax Weirdness
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-89386@lists.php.net to get a copy of this message
Hi! >> <?php >> function a(\int $i) {} >> >> Is it intentional that the \ in front of the "int" is allowed? IMHO, >> this >> confusing notation must not be allowed. > > This is weird and I'd consider it a bug. You can't do \array or > \callable, and if I saw \int, I'd think it meant a class of that name > rather than a scalar type. I would assume \int means class named "int", as opposed to "int" type. But banning it may be ok too. > > Can this be fixed for 7.0.0? I don't think this would be a good idea. We're in the final stretch of release cycle, and should not do any non-urgent fixes. This does not look urgent. It can wait for 7.0.1. -- Stas Malyshev smalyshev@gmail.com

« previous php.internals (#89386) next »