note 92411 rejected from language.oop5.interfaces by danbrown
| From: | danbrown@php.net | Date: | Thu, 23 Jul 2009 14:06:03 +0000 |
| Subject: | note 92411 rejected from language.oop5.interfaces by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-158629@lists.php.net to get a copy of this message | ||
Note Submitter: themastersleader at hotmail dot com
----
Bug in php 5.3.0
There's a bug in php 5.3.0 (I think)
http://bugs.php.net/bug.php?id=48984
By implementing an interface all functions in a base class are seen as an interface.
<?php
error_reporting( E_ALL );
set_error_handler('errorReporting');
interface test { }
class ParentClass
implements test
{
private function foo() { }
}
class ChildClass
extends ParentClass
{
public function foo(array $content) { }
}
function errorReporting($errno, $errstr, $errfile, $errline)
{
echo($errstr . '<br />');
}
?>
This gives an error while this doesn't:
<?php
error_reporting( E_ALL );
set_error_handler('errorReporting');
class ParentClass
{
private function foo() { }
}
class ChildClass
extends ParentClass
{
public function foo(array $content) { }
}
function errorReporting($errno, $errstr, $errfile, $errline)
{
echo($errstr . '<br />');
}
?>