Re: [VOTE] Scalar Type Hints

From: Date: Sun, 08 Feb 2015 05:40:36 +0000
Subject: Re: [VOTE] Scalar Type Hints
References: 1 2 3 4 5 6 7 8 9  Groups: php.internals 
Request: Send a blank email to internals+get-82116@lists.php.net to get a copy of this message
On Sun, Feb 8, 2015 at 11:33 AM, Pierre Joye <pierre.php@gmail.com> wrote: >> > Yes, the RFC is somewhat inaccurate in that respect. It is per-file in >> > one sense (like encoding, but unlike ticks, it has no effect on the >> > including or included files). However, it technically affects the remainder >> > of the file, not the whole file. >> >> Well, no, not the remainder of the file either since it can be switched >> again. It only affects the part of the file between declares if there is >> a second one. > > For this specific weirdness it should really be fixed somehow, like for > namespace. It has to be used at the top of a file. As it is a compile time > thing, the extra check should not have much impact. and it was also not correct that we never used declare for such things. http://lxr.php.net/xref/PHP_TRUNK/Zend/zend_compile.c#3776 about encoding. And it has to get this exact kind of check for the exact same reasons. In other words, we can use the same solution. -- Pierre @pierrejoye | http://www.libgd.org

« previous php.internals (#82116) next »