Re: Class Properties in Interfaces?
| From: | Marcus Boerger | Date: | Sun, 18 May 2008 16:41:11 +0000 |
| Subject: | Re: Class Properties in Interfaces? | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-37702@lists.php.net to get a copy of this message | ||
Hello Christian,
Sunday, May 18, 2008, 1:30:08 PM, you wrote:
> Hi Marcus,
> Am 18.05.2008 um 13:20 schrieb Marcus Boerger:
>> Not allowing unset() is the bug. Having unset delete the property
>> would be
>> the error. As long as the property still exists with value NULL all is
>> fine.
> I think unset($foo->bar) should unset while $foo->bar = null should
> set to null to keep things consistent and true to the operation's name.
Just to make this clear once and for ever. If unset() deletes the property then:
a) it would break inheritance
b) accomplish nothing, as the next access would simply recreate it
> But as long as unset() is allowed (with either semantics) I'm happy to
> end this thread.
> - Chris
Best regards,
Marcus