>> Why change the expected behavior of isset? If a property has not been
>> set
>> then isset must return false, and that includes $foo->name = NULL.
>>
>>
>> Regards.
>>
>
> Say the property is write-only. How can isset() operate on that? If
> the property is read-only, how can you unset() it?

If the property is write-only, I would imagine isset would return false,
because there is no value to read.  I think when you call isset(), you are
asking, "is there something for me to read?", so this would make sense.

If the property is read-only, then unset would have no effect.  Unsetting
is a "write" action (like deleting a file), so if its read-only, it cannot
be unset.  It could possibly throw a non-fatal error too I suppose.


- Dennis


--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to