php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #38148 inheritance compatibility standards break *
Submitted: 2006-07-19 18:12 UTC Modified: 2006-07-19 20:00 UTC
From: kennyt@php.net Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 6CVS-2006-07-19 (CVS) OS:
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: kennyt@php.net
New email:
PHP Version: OS:

 

 [2006-07-19 18:12 UTC] kennyt@php.net
Description:
------------
the new "fatal: decl. of Child::foo() is incompatible with Parent::foo()" errors cause lots of applications to break.

Reproduce code:
---------------
<?php
ini_set('display_errors', 1);

class Paren {
 function foo() {}
}

class Chil extends Paren {
 function foo($f, $x, $y) {}
}



Actual result:
--------------
Fatal error: Declaration of Chil::foo() must be compatible with that of Paren::foo() in /.../php5/test.php on line 10


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-07-19 19:28 UTC] helly@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

This is PHP 5 now.
 [2006-07-19 20:00 UTC] kennyt@php.net
This assumes that a lot of teams are going to spend time to get around broken BC. Is there any major reason to not include an option to ignore these?
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Dec 06 22:00:02 2025 UTC