On Wed, Nov 25, 2015 at 4:47 AM, Xinchen Hui <larue...@php.net> wrote:

> Hey:
>
>
>
> On Wed, Nov 25, 2015 at 4:49 AM, Bob Weinand <bobw...@hotmail.com> wrote:
>
> > > Am 24.11.2015 um 20:30 schrieb Matteo Beccati <p...@beccati.com>:
> > >
> > > On 24/11/2015 18:50, Andrea Faulds wrote:
> > >> There's no syntax change. We'd be adding another fatal error to
> > >> zend_compile.c triggered by a flag on the token. No messing around
> with
> > >> the parser.
> > >>
> > >> I understand your concern about the risk, but it's the kind of change
> > >> that wouldn't break anything without it being tremendously obvious.
> > >
> > > I agree and we should be still in time for RC8.
> > >
> > >
> > > Cheers
> > > --
> > > Matteo Beccati
> >
> > Hey,
> >
> > I fixed the issue via
> >
> http://git.php.net/?p=php-src.git;a=commitdiff;h=569763cb1ac67f56e7743062ca8b3b7c650c1254
> >
> > I think too this should go into PHP 7.0.0 as it is some type of a
> language
> > related change (even if not directly failing in parser...)
> >
> >
> I've made a improvement to the fix(
>
> https://github.com/php/php-src/commit/00865ae22f2c5fdee9e500ce79d442467e0a0899
> )
> ,
>
> before this, \array will result a syntax , but \int result a compiler
> error, which seems a little in-consistent.
>

Imho this additional change is not necessary, it only makes the parser more
complicated.

However something missing from the original patch is handling of relative
names like namespace\int. Instead of checking for ast->attr == ZEND_NAME_FQ
it should check for ast->attr != ZEND_NAME_NOT_FQ.

Nikita

Reply via email to