|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2010-05-31 10:04 UTC] gopalv82 at yahoo dot com
  [2010-06-01 08:18 UTC] gopalv82 at yahoo dot com
 | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Thu Oct 30 04:00:02 2025 UTC | 
Description: ------------ This bug seems to be related to #5401. Certain class hierarchies produce a Fatal Error when loading. I experience this error using the Swift mailing library (version 4.0.6) when creating an attachment before creating a message. To simulate this (without the Swift library), create the following files: Aa.php ------ <?php class Aa extends Base { } Ba.php ------ <?php class Ba extends Bb implements Ib { } Bb.php ------ <?php class Bb extends Base { } Base.php -------- <?php class Base implements Ia { } Ia.php ------ <?php interface Ia { const LEVEL_TOP = 16; } Ib.php ------ <?php interface Ib extends Ia { } bug.php ------- <?php require_once "Ia.php"; require_once "Base.php"; require_once "Aa.php"; $a = new Aa(); require_once "Ib.php"; require_once "Bb.php"; require_once "Ba.php"; $b = new Ba(); echo "Hello World"; Finally, restart Apache (or clear your APC cache) and load bug.php. You should see "Hello World". Now refresh the page. Instead of "Hello World", you should get a Fatal error: Cannot inherit previously-inherited or override constant LEVEL_TOP from interface Ib in /var/www/localhost/htdocs/apctest/Ba.php on line 5 I've seen this with PHP 5.3.2 and PHP 5.2.12 with APC 3.1.3p1. BTW: The test case in #5401 works correctly for me, so while this bug seems similar, it doesn't look the same bug. Expected result: ---------------- Hello World Actual result: -------------- First run: Hello World Second run: Fatal error: Cannot inherit previously-inherited or override constant LEVEL_TOP from interface Ib in /var/www/localhost/htdocs/apctest/Ba.php on line 5