php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49033 Class threaded as interface
Submitted: 2009-07-23 12:21 UTC Modified: 2009-07-23 14:00 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: themastersleader at hotmail dot com Assigned:
Status: Not a bug Package: Class/Object related
PHP Version: 5.3.0 OS: NVM
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: themastersleader at hotmail dot com
New email:
PHP Version: OS:

 

 [2009-07-23 12:21 UTC] themastersleader at hotmail dot com
Description:
------------
When a base class implements an interface the base class is also threated as an interface. IT'S A CRITICAL BUG IN MY OPINION!!!



Reproduce code:
---------------
<?php 
error_reporting( E_ALL ); 
set_error_handler('errorReporting'); 

interface test { } 

class ParentClass 
implements test 
{ 
    private function foo() { } 
} 

class ChildClass 
extends ParentClass 
{ 
    //HERE WE GET AN STRICT ERROR BECAUSE OF THE PARAMS BUT THE FUNCTION IS NOT DEFINED IN THE INTERFACE OR ABSTRACT
    public function foo(array $content) { } 
} 

function errorReporting($errno, $errstr, $errfile, $errline) 
{ 
    echo($errstr); 
} 
?> 

Expected result:
----------------
no erros

Actual result:
--------------
We get a strict error here

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-07-23 14:00 UTC] derick@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 02 10:01:38 2025 UTC