Re: Class Properties in Interfaces?

From: Date: Sun, 18 May 2008 17:16:55 +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 18  Groups: php.internals 
Request: Send a blank email to internals+get-37703@lists.php.net to get a copy of this message
Hi Marcus, Am 18.05.2008 um 18:41 schrieb Marcus Boerger:
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
Ok, you don't want this thread to die, so here we go: You keep on repeating your two points, care to show some code demonstrating it? Contradicting tests: class A { var $foo = 42; } $a = new A; var_dump($a); # Output: object(A)#2 (1) { ["foo"]=> int(42) } $a->foo = null; var_dump($a); # Output: object(A)#2 (1) { ["foo"]=> NULL } unset($a->foo); var_dump($a); # Output: object(A)#2 (0) { } $x = $a->foo; var_dump($a); # Output: object(A)#2 (0) { } This is exactly the same behaviour as for any variable, nothing broken here. Can we please move on now? Regards, - Chris

« previous php.internals (#37703) next »