Re: Property Overloading RFC
| From: | Stanislav Malyshev | Date: | Sun, 28 Aug 2005 08:17:50 +0000 |
| Subject: | Re: Property Overloading RFC | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-18505@lists.php.net to get a copy of this message | ||
DR>>Problem 1 is the least of the 3 problems, but introducing the keyword
DR>>also helps solving the other two.
Strangely enough it is the agument I happen to hear most. I think it's not
PHP problem at all.
DR>>If I'm not wrong, __isset() checks if something is *set* not if it's
DR>>available. The reason for __have_prop() is to check whether something is
DR>>declaread as "property" in the class. There is no other way of doing
DR>>that unless we'd like to break BC.
That, however, does not answer my second question - when __have_prop would
be called by the engine and if never, what prevents you from calling any
method __have_prop just now?
DR>>If it returns false, the engine can throw an error on the line where
DR>>it was used, not inside the __get() method itself, as that doesn't
DR>>help debugging your code (as you don't usually know where it was
DR>>called from).
That I understand. However, you still don't have means to know _what_
was wrong in this line. BTW, how comes you don't know where it came from
if you have backtrace?
--
Stanislav Malyshev, Zend Products Engineer
stas@zend.com http://www.zend.com/ +972-3-6139665 ext.115