I have two child classes C1 and C2 that both inherit
from a parent class P.
P inherits from the class GP (grandparent).
P, C1 and C2 are in separate files, P.php, C1.php and
C2.php, respectively. GP is defined in index.php.
C1.php:
<?php
require_once 'P.php';
class C1 extends P { }
?>
C2.php:
<?php
require_once 'P.php';
class C2 extends P { }
?>
P.php:
<?php
require_once 'C2.php';
class P extends GP {
function getC2() {
return new C2();
}
}
?>
index.php:
<?php
class GP { }
require_once 'C1.php';
echo 'Done';
?>
As one can see, C1 and C2 require the file containing
their parent class P.php. P require's the file
containing one of its children, C2 (this is necessary
because P is used to create instances of C2).
Now, when index.php is called without eAccelerator
being enabled, everything works fine.
When index.php is called with eAccelerator enabled, the
following error occurs:
Fatal error: Class 'P' not found in
/var/home/dr/public_html/ea/C2.php on line 3
I assume that eAccelerator has problems handling the
circular file dependencies.
I am using eAccelerator v0.9.3-rc2, PHP Version 5.0.4,
Zend Engine v2.0.4-dev