Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:9645 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 60623 invoked by uid 1010); 4 May 2004 05:26:04 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 60517 invoked by uid 1007); 4 May 2004 05:26:04 -0000 Message-ID: <20040504052554.60192.qmail@pb1.pair.com> To: internals@lists.php.net Date: Tue, 4 May 2004 14:25:51 +0900 Lines: 17 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 X-Posted-By: 202.179.19.82 Subject: nested includes fails? From: tumurbaatar@datacom.mn ("Tumurbaatar S.") 'common.php' contains some class definition and PHP5 fails with 'PHP Fatal error: Cannot redeclare class ... in common.php...' when script C.php starts. The file including map is: A.php: require_once(common.php) B.php: require_once(common.php) C.php: require_once(A.php) require_once(B.php) That is bug? When only one file is included (A or B), the contents of 'common.php' is available, i.e. nested require works. Only fails when nested and multiple require. P.S. I use PHP5 RC2 running as CGI on WinXP/IIS.