Re: Inconsistent behavior when using interfaces
Hello Ralph,
Monday, May 21, 2007, 9:32:27 PM, you wrote:
> Is this a problem or not?
> The following will produce this notice:
> Strict Standards: Declaration of Z_Concrete::__get() should be
> compatible with that of Z_Abstract::__get() in xxx on line 16
> <?php
> error_reporting(E_ALL | E_STRICT);
> interface Z_Interface
> { }
> abstract class Z_Abstract implements Z_Interface
> {
> public function __get($name)
> {
> return;
> }
> }
> class Z_Concrete extends Z_Abstract
> {
> public function & __get($name)
> {
> return null;
> }
> }
> $t = new Z_Concrete();
> This code will not produce a notice:
> <?php
> error_reporting(E_ALL | E_STRICT);
> abstract class Z_Abstract
> {
> public function __get($name)
> {
> return;
> }
> }
> class Z_Concrete extends Z_Abstract
> {
> public function & __get($name)
> {
> return null;
> }
> }
> $t = new Z_Concrete();
> The only difference is that the former has an interface as a parent, the
> latter does not. Is this a bug?
yes
best regards
marcus
Now completely out of topic:
> CONFIDENTIALITY NOTICE: This e-mail message, including any attachments,
> is being sent by 3Com
bla bullshit nonsense
in the same manner i guess it makes no sense tocommunicate further? :-)
this is a general consideration, people should stop sending these non
applicable message stubs. They render open source unuseable.
Best regards,
Marcus
Thread (3 messages)