I am running PHP 5.5.11. In my php.ini I have
error_reporting = E_ALL
My code uses spl_autoload_register()
to register an autoloader. When I load a page I get a blank white page. I get an error in the log that Foo
can not be found. Foo is defined in my autoloader. Here is the basic structure:
index.inc
calls a method on A
. That method calls a method on B
. B
extends C
. C
uses a class constant of Foo
( Foo::LEVEL
). It seems that it is the parsing of the class constant that is causing the error. I can fix this if I go ahead and load Foo at the top of index.inc by calling:
$oTrash = new Foo();
I can also get rid of the issue by changing my php.ini to:
error_reporting = E_ALL & ~E_STRICT
The fatal I am getting is not a strict mode error. I don't understand the impact that E_STRICT is having on the processing of my code.