From ea9305c543823220d16ba17da0650eefcffb6e57 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 18 Mar 2008 08:36:49 +0000 Subject: 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); } --- sapi/cli/php_cli.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sapi/cli/php_cli.c') diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c index 4478288cb7..05ee0cc05c 100644 --- a/sapi/cli/php_cli.c +++ b/sapi/cli/php_cli.c @@ -837,7 +837,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': -- cgit v1.2.1