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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Fri May 24 11:01:34 2024 UTC