Re: [PHP-DEV] [RFC] Remove calls with incompatible Context

2012-08-06 Thread jpauli
On Sat, Aug 4, 2012 at 12:36 AM, Etienne Kneuss wrote: > On Mon, Jul 30, 2012 at 7:31 PM, Gustavo Lopes wrote: >> https://wiki.php.net/rfc/incompat_ctx >> >> An RFC for deprecating and removing $this from incompatible context. >> >> Comments are welcome. After several explanations with Etienne o

Re: [PHP-DEV] [RFC] Remove calls with incompatible Context

2012-08-06 Thread jpauli
On Sat, Aug 4, 2012 at 12:40 AM, Andrew Faulds wrote: > While we're at it, > > $a = 'this'; > $$a = new StdClass(); > > should be an error. > Also $GLOBALS['this'] = new StdClass(); > > https://bugs.php.net/bug.php?id=52428 Hehe, I already caught all those executor tricks, like : http://www.php.n

[PHP-DEV] 回复: [PHP-DEV] [RFC] Remove calls with incompatible Context

2012-08-03 Thread Reeze Xia
在 2012年8月4日星期六,上午6:40,Andrew Faulds 写道: > On 03/08/12 23:36, Etienne Kneuss wrote: > > On Mon, Jul 30, 2012 at 7:31 PM, Gustavo Lopes > (mailto:glo...@nebm.ist.utl.pt)> wrote: > > > https://wiki.php.net/rfc/incompat_ctx > > > > > > An RFC for deprecating and removing $this from incompatible c

Re: [PHP-DEV] [RFC] Remove calls with incompatible Context

2012-08-03 Thread Andrew Faulds
On 03/08/12 23:36, Etienne Kneuss wrote: On Mon, Jul 30, 2012 at 7:31 PM, Gustavo Lopes wrote: https://wiki.php.net/rfc/incompat_ctx An RFC for deprecating and removing $this from incompatible context. Comments are welcome. 4+ years ago Marcus already wanted to clean that up in PHP6. Defini

Re: [PHP-DEV] [RFC] Remove calls with incompatible Context

2012-08-03 Thread Etienne Kneuss
On Mon, Jul 30, 2012 at 7:31 PM, Gustavo Lopes wrote: > https://wiki.php.net/rfc/incompat_ctx > > An RFC for deprecating and removing $this from incompatible context. > > Comments are welcome. 4+ years ago Marcus already wanted to clean that up in PHP6. Definitely +1. Best, > > -- > Gustavo Lop

Re: [PHP-DEV] [RFC] Remove calls with incompatible Context

2012-08-03 Thread Ferenc Kovacs
On Mon, Jul 30, 2012 at 7:31 PM, Gustavo Lopes wrote: > https://wiki.php.net/rfc/**incompat_ctx > > An RFC for deprecating and removing $this from incompatible context. > > Comments are welcome. > > -- > Gustavo Lopes > > -- > PHP Internals - PHP Runtime Deve

Re: [PHP-DEV] [RFC] Remove calls with incompatible Context

2012-08-02 Thread Stas Malyshev
Hi! > https://wiki.php.net/rfc/incompat_ctx > > An RFC for deprecating and removing $this from incompatible context. IMO makes sense. Nulling-out $this makes most of the sane code (like de-facto static functions not marked as static) work, and breaking insane code in 5.5 in acceptable. -- Stani

Re: [PHP-DEV] [RFC] Remove calls with incompatible Context

2012-08-02 Thread Gustavo Lopes
Em 2012-07-31 1:55, Christopher Jones escreveu: On 07/30/2012 01:32 PM, Gustavo Lopes wrote: 3. There are other low-cost alternatives, namely the obvious one: pass the object via an extra parameter instead of operating on $this directly and unconditionally. This is really easy to do. This ki

Re: [PHP-DEV] [RFC] Remove calls with incompatible Context

2012-08-01 Thread Andrew Faulds
Slightly off-topic, $this being equal to NULL reminds me of how ECMAScript 5 changed the value of "this" to "undefined" in strict mode when not being called as a method. I agree it's a more sensible solution, as the disappearance of a variable might be more difficult to deal with than a variable c

Re: [PHP-DEV] [RFC] Remove calls with incompatible Context

2012-07-30 Thread Christopher Jones
On 07/30/2012 01:32 PM, Gustavo Lopes wrote: 3. There are other low-cost alternatives, namely the obvious one: pass the object via an extra parameter instead of operating on $this directly and unconditionally. This is really easy to do. This kind of thing should be mentioned in the RFC. C

Re: [PHP-DEV] [RFC] Remove calls with incompatible Context

2012-07-30 Thread Gustavo Lopes
Em Mon, 30 Jul 2012 21:11:58 +0200, Todd Ruth escreveu: On Mon, 2012-07-30 at 19:31 +0200, Gustavo Lopes wrote: https://wiki.php.net/rfc/incompat_ctx An RFC for deprecating and removing $this from incompatible context. Comments are welcome. I'm just a user, but I'd like to beg that the

Re: [PHP-DEV] [RFC] Remove calls with incompatible Context

2012-07-30 Thread Gustavo Lopes
Em Mon, 30 Jul 2012 19:42:59 +0200, Will Fitch escreveu: I think this is a good idea. I agree with the intention of throwing E_DEPRECATED in 5.5, but what do you propose happen afterwards? Throw a fatal error? I would just like to make "removing (in the next version)" a little more defini

Re: [PHP-DEV] [RFC] Remove calls with incompatible Context

2012-07-30 Thread Will Fitch
On Mon, Jul 30, 2012 at 3:11 PM, Todd Ruth wrote: > On Mon, 2012-07-30 at 19:31 +0200, Gustavo Lopes wrote: > > https://wiki.php.net/rfc/incompat_ctx > > > > An RFC for deprecating and removing $this from incompatible context. > > > > Comments are welcome. > > > > -- > > Gustavo Lopes > > I'm jus

Re: [PHP-DEV] [RFC] Remove calls with incompatible Context

2012-07-30 Thread Todd Ruth
On Mon, 2012-07-30 at 19:31 +0200, Gustavo Lopes wrote: > https://wiki.php.net/rfc/incompat_ctx > > An RFC for deprecating and removing $this from incompatible context. > > Comments are welcome. > > -- > Gustavo Lopes I'm just a user, but I'd like to beg that the feature not be removed, at lea

Re: [PHP-DEV] [RFC] Remove calls with incompatible Context

2012-07-30 Thread Anthony Ferrara
Gustavo, On Mon, Jul 30, 2012 at 1:31 PM, Gustavo Lopes wrote: > https://wiki.php.net/rfc/**incompat_ctx > > An RFC for deprecating and removing $this from incompatible context. > > Comments are welcome. A few points. 1. Finally! It's caused a lot of WTF

Re: [PHP-DEV] [RFC] Remove calls with incompatible Context

2012-07-30 Thread Will Fitch
I think this is a good idea. I agree with the intention of throwing E_DEPRECATED in 5.5, but what do you propose happen afterwards? Throw a fatal error? I would just like to make "removing (in the next version)" a little more definitive. On Mon, Jul 30, 2012 at 1:31 PM, Gustavo Lopes wrote: > h

[PHP-DEV] [RFC] Remove calls with incompatible Context

2012-07-30 Thread Gustavo Lopes
https://wiki.php.net/rfc/incompat_ctx An RFC for deprecating and removing $this from incompatible context. Comments are welcome. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php