note 92411 added to language.oop5.interfaces
| From: | themastersleader at hotmail dot com | Date: | Thu, 23 Jul 2009 12:16:21 +0000 |
| Subject: | note 92411 added to language.oop5.interfaces | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-158618@lists.php.net to get a copy of this message | ||
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 />');
}
?>
----
Server IP: 64.71.164.2
Probable Submitter: 82.93.229.112
----
Manual Page -- http://www.php.net/manual/en/language.oop5.interfaces.php
Edit -- https://master.php.net/note/edit/92411
Del: integrated -- https://master.php.net/note/delete/92411/integrated
Del: useless -- https://master.php.net/note/delete/92411/useless
Del: bad code -- https://master.php.net/note/delete/92411/bad+code
Del: spam -- https://master.php.net/note/delete/92411/spam
Del: non-english -- https://master.php.net/note/delete/92411/non-english
Del: in docs -- https://master.php.net/note/delete/92411/in+docs
Del: other reasons-- https://master.php.net/note/delete/92411
Reject -- https://master.php.net/note/reject/92411
Search -- https://master.php.net/manage/user-notes.php