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
 [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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 17:01:29 2024 UTC