AG>>Probably because private variables do often have getters and setters, AG>>whereas something which is marked as read-only (like a harddrive) AG>>tends to be read-only always.
I think that by itself returning writable reference to such variable voluntarily is undesirable, but not fatal - i.e., in most cases the advice would be "just don't do it" but if you think you know what you are doing, you may do it. What I'm concerned about, however - and that is somehow related to what Andi is saying I think - is that this concept would not sit well with PHP semantics. The thing here is that PHP has some cases where writable zval reference is taken without really knowing how it would be used. And in these cases we might find out we actually have no good way to insert the check. I remember we had to do various tricks to make get/set handlers work in all cases where writable zval is required and I'm not sure there's no bordercases even now when it doesn't do exactly what one might expect it to do - but we might get a lot of additional problems when we add non-trivial semantics like denying writes on top of this. -- Stanislav Malyshev, Zend Products Engineer [EMAIL PROTECTED] http://www.zend.com/ +972-3-6139665 ext.115 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php