Re: Patch for opcode caches

From: Date: Tue, 18 Mar 2008 08:55:15 +0000
Subject: Re: Patch for opcode caches
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-36188@lists.php.net to get a copy of this message
The patch has been just committed. You should use something like the following code to make it work. 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);
} Thanks. Dmitry. phpxcache wrote:
session (or caused by TSRM/ZendEngine) seems broken in my local cvs checkout i'm not sure if it's relatived to this patch but i did 'cvs up' and some commit broke the patch (with conflicts) please commit, or roll out another diff against the PHP_5_3 cvs so i can test it again thanks


« previous php.internals (#36188) next »