Andi
At 11:41 PM 5/4/2004 +1200, Jevon Wright wrote:
I tested it on PHP 5 RC1, Win XP SP1, IIS 5.1 running as CGI - it didn't fail. I tried it on PHP 5 RC2, Win XP SP1, IIS 5.1 running as CGI - it didn't fail then, either. (Calling c.php)
a.php <?php require_once("common.php"); ?>
b.php <?php require_once("common.php"); ?>
c.php <?php require_once("a.php"); require_once("b.php"); ?>
common.php <?php class Foo { } ?>
Jevon
----- Original Message ----- From: "Tumurbaatar S." <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, May 04, 2004 5:25 PM Subject: [PHP-DEV] nested includes fails?
> '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. > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php