php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #54052 Incorrect Interface Implementation Not Displaying Errors
Submitted: 2011-02-19 04:02 UTC Modified: 2011-02-20 06:51 UTC
From: rprice at wpi dot edu Assigned:
Status: Not a bug Package: Class/Object related
PHP Version: 5.3.5 OS: Ubuntu 10.10
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: rprice at wpi dot edu
New email:
PHP Version: OS:

 

 [2011-02-19 04:02 UTC] rprice at wpi dot edu
Description:
------------
A class Foo implements an interface IFoo. When Foo implements a method with less 
parameters than the expected parameter count as specified by IFoo, PHP terminates 
with no errors. The sample script demonstrates this because the 'Checkpoint' is 
never echoed.

Test script:
---------------
<?php

interface IFoo {
	public function method($one);
}

class Foo implements IFoo {
	public function method() {}
}

echo 'Checkpoint';

?>


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-02-20 06:51 UTC] dtajchreber@php.net
-Status: Open +Status: Bogus
 [2011-02-20 06:51 UTC] dtajchreber@php.net
Check your error_reporting and display_errors settings. I get fatal error on every version I tested:

http://codepad.org/cTtDfbrK /* 5.2.5 */
http://codepad.org/ejpAWQ9S /* 5.3.6-dev */
http://codepad.viper-7.com/o7ROKd /*5.3.99-dev */
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 31 22:01:27 2024 UTC