Re: Unexpected results from constant folding

From: Date: Wed, 15 Mar 2017 14:53:16 +0000
Subject: Re: Unexpected results from constant folding
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-98537@lists.php.net to get a copy of this message
On Wed, Mar 15, 2017 at 5:36 AM, Nikita Popov <nikita.ppv@gmail.com> wrote: > Yes, this should behave as C. See also > https://bugs.php.net/bug.php?id=69676 > for an existing bug report on the topic. > Given that bug is assigned to you, I'll just leave it in your hands then? > I think in 7.1 it might be even fairly simple so fix this: IIRC we now store > the defining CE on inherited constants, so we should know the scope to > resolve against. > Even in 7.0 you could rewrite unresolved self:: references to the current classname.Not as clean when it comes to producing error messages, but certainly a quick and easy fix for the case where the userspace code isn't broken. I had initially been thinking multi-pass, but there are some pretty easy edge cases to fall into there... -Sara

« previous php.internals (#98537) next »