diff options
author | Dmitry Stogov <dmitry@php.net> | 2008-03-18 08:36:30 +0000 |
---|---|---|
committer | Dmitry Stogov <dmitry@php.net> | 2008-03-18 08:36:30 +0000 |
commit | 8c885b89130e3549297316c0769b27d9d3657902 (patch) | |
tree | fb311427f56f1cf255c0065bf1720aa4275fd1b9 /sapi | |
parent | 7c8ff91218425d8976ada68b7743eef8a1b4ba5c (diff) | |
download | php-git-8c885b89130e3549297316c0769b27d9d3657902.tar.gz |
Implemented concept of "delayed early binding" that allows opcode caches to perform class declaration (early and/or run-time binding) in exactly the same order as vanila php.
The following pseudo-code explains how it should be used in opcode cache.
function cache_compile_file($filename) {
if (!is_cached($filename)) {
...
orig_compiler_options = CG(compiler_optins);
CG(compiler_options) |= ZEND_COMPILE_IGNORE_INTERNAL_CLASSES |
ZEND_COMPILE_DELAYED_BINDING;
$op_array = orig_compile_file($filename);
CG(compiler_options) = orig_copiler_options;
...
} else {
$op_array = restore_from_cache($filename);
}
zend_do_delayed_early_binding($op_array);
}
Diffstat (limited to 'sapi')
-rw-r--r-- | sapi/cgi/cgi_main.c | 2 | ||||
-rw-r--r-- | sapi/cli/php_cli.c | 2 | ||||
-rw-r--r-- | sapi/milter/php_milter.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index 22463ad55c..c5f722e04c 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -1691,7 +1691,7 @@ consult the installation file that came with this distribution, or visit \n\ break; case 'e': /* enable extended info output */ - CG(extended_info) = 1; + CG(compiler_options) |= ZEND_COMPILE_EXTENDED_INFO; break; case 'f': /* parse file */ diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c index 3392fb0b22..f36f84427a 100644 --- a/sapi/cli/php_cli.c +++ b/sapi/cli/php_cli.c @@ -824,7 +824,7 @@ int main(int argc, char *argv[]) break; case 'e': /* enable extended info output */ - CG(extended_info) = 1; + CG(compiler_options) |= ZEND_COMPILE_EXTENDED_INFO; break; case 'F': diff --git a/sapi/milter/php_milter.c b/sapi/milter/php_milter.c index e0a3c60a1c..aa8e59d01b 100644 --- a/sapi/milter/php_milter.c +++ b/sapi/milter/php_milter.c @@ -1033,7 +1033,7 @@ int main(int argc, char *argv[]) break; case 'e': /* enable extended info output */ - CG(extended_info) = 1; + CG(compiler_options) |= ZEND_COMPILE_EXTENDED_INFO; break; case 'f': /* parse file */ |