1 Oct 2006 13:48
[PHP-DEV] issue of current E_STRICT implemention and possible solution
phpxcache <phpxcache <at> gmail.com>
2006-10-01 11:48:46 GMT
2006-10-01 11:48:46 GMT
the E_STRICT is an error type that issued at compile-time. and user
error handler is called, switching to runtime. mixing
runtime/compile-time is imho, not good, and cause problem in the real
world.
the flow:
script, include -> compiling, issue E_STRICT -> user error handler.
official bug:
1. set up user error handler
2. issue E_STRICT inside class compiling
function my_error_handler()
{
include_once "debugger.class.php"; // #1
$dbg = Debugger::getInstance();
...
}
is the behavior defined at point #1 ? if it is allowed, what if wrote
"class Debugger { ..." into debugger.class.php ? it just tell me "u
cannot declare class inside another class" (something like this)
3rd party bug:
XCache is doing nice on late class binding by building "compiler
sandbox" for ZendEngine, which clear class_table/function_table
temporarily, to make the compiler-env exactly the same every time.
but inside the sandbox, functions/classes defined before compiling, is
never exists inside the compile-time, leading to a "undefined
(Continue reading)
. I try to find time
to write a small documentation but it is quite easy to use as there are only 3 files
(Autoload.php is the runtime include, loading a map file uses Autoload::load(),
Autoload_Builder.php is the CLI map builder and it has a '-h' flag to display its syntax).
Until I write the doc, you will have to use it the PEAR way
RSS Feed