Re: fatal static call in php 6.0?
| From: | Stanislav Malyshev | Date: | Sun, 28 May 2006 08:04:53 +0000 |
| Subject: | Re: fatal static call in php 6.0? | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-23746@lists.php.net to get a copy of this message | ||
MB>>> I know the following test case does not even remotely follow
MB>>> good OO design principles, but it's hard to imagine us going
MB>>> back to the drawing board with our app. Please don't break
MB>>> the following in php6 just to teach me a lesson about OO design.
That's not about some abstract design principles - it's just a bug in OO
implementation, static call should not leave $this from previous context
dangling. Of course it's unlpleasant to find your code to rely on buggy
behaviour, but bugs need to be fixed anyway. There's no single reason I
can imagine why "$this" in context of static call should mean "the object
we used last time on the stack where we had member function call". That's
just not right.
MB>>> test that $this survives in a semi-static call
What on earth "semi-static" could mean???
--
Stanislav Malyshev, Zend Products Engineer
stas@zend.com http://www.zend.com/ +972-3-6139665 ext.115