Re: [PHP-DEV] Use behavior thoughts

2015-03-06 Thread Anthony Ferrara
Lee, On Fri, Mar 6, 2015 at 7:06 AM, Lee Davis wrote: > > Hi Anthony. > >This issue that has plagued me in the past, specifically with the use of > traits: > > Error: http://3v4l.org/VFguK > OK: http://3v4l.org/73b86 > > Although when combined with opcache does causes very confusing beha

Re: [PHP-DEV] Use behavior thoughts

2015-03-06 Thread Lee Davis
Hi Anthony. This issue that has plagued me in the past, specifically with the use of traits: Error: http://3v4l.org/VFguK OK: http://3v4l.org/73b86 Although when combined with opcache does causes very confusing behaviour, I do worry that removing the error altogether may make it worse fo

Re: [PHP-DEV] Use behavior thoughts

2015-03-06 Thread Michael Wallner
> > So, I created a PR to remove this error: > https://github.com/php/php-src/pull/1149 > +1 > > Note that there is no BC break here, as it's removing an error condition > today. > > This results in a weird edge case (which is 100% valid, but feels

Re: [PHP-DEV] Use behavior thoughts

2015-03-06 Thread reeze
On 6 March 2015 at 16:35, Alexander Lisachenko wrote: > Hello! > > 2015-03-05 22:40 GMT+03:00 Anthony Ferrara : > > > This requires use to immediately follow namespace declarations: > > > > namespace Foo { > > use Bar; //valid > > } > > namespace Bar { > > use Foo; //valid, second namespa

Re: [PHP-DEV] Use behavior thoughts

2015-03-06 Thread Alexander Lisachenko
Hello! 2015-03-05 22:40 GMT+03:00 Anthony Ferrara : > This requires use to immediately follow namespace declarations: > > namespace Foo { > use Bar; //valid > } > namespace Bar { > use Foo; //valid, second namespace in file > } > namespace Baz { > echo "Hi!"; > use Foo; // Invalid

[PHP-DEV] Use behavior thoughts

2015-03-05 Thread Anthony Ferrara
All, Currently, use has a few error cases that are rather fragile. For example: namespace Biz { class Bar {}; } namespace Foo { use Biz\Bar; $a = new Bar; var_dump($a); } namespace Foo { class Bar {}; } http://3v4l.org/IPTiQ That works 100% of the time, on 5.3.0 -> present