Hi Andrea, On Thu, Dec 4, 2014 at 5:32 PM, Andrea Faulds <a...@ajf.me> wrote:
> > I think we can get rid of this error now when literal is returned. > > The reason we have E_STRICT error is that legacy PHP didn't > > support this, I suppose. > > > > http://3v4l.org/8fISj > > Hmm, I think there’s some logic to having a warning anyway. If a parameter > is taken by reference, then it’s presumably going to be modified. So if you > pass something that isn’t a variable (and therefore the modified result > can’t be accessed) to a by-reference parameter, it doesn’t really make > sense. I agree. It might be a bug in user code simply. However, example code illustrates that there is valid usage. Static method may return literal, default for some config, etc. http://3v4l.org/jKXpb We may use @ or get rid of E_STRICT altogether. I wonder if we really need E_STRICT error here. -- Yasuo Ohgaki yohg...@ohgaki.net