if (EG(zend_constants)) {
zend_string *key;
zval *zv;
+
+ /* Remember __COMPILER_HALT_OFFSET__(s) */
+ ZEND_HASH_FOREACH_PTR(preload_scripts, script) {
+ zend_execute_data *orig_execute_data = EG(current_execute_data);
+ zend_execute_data fake_execute_data;
+ zval *offset;
+
+ memset(&fake_execute_data, 0, sizeof(fake_execute_data));
+ fake_execute_data.func = (zend_function*)&script->script.main_op_array;
+ EG(current_execute_data) = &fake_execute_data;
+ if ((offset = zend_get_constant_str("__COMPILER_HALT_OFFSET__", sizeof("__COMPILER_HALT_OFFSET__") - 1)) != NULL) {
+ script->compiler_halt_offset = Z_LVAL_P(offset);
+ }
+ EG(current_execute_data) = orig_execute_data;
+ } ZEND_HASH_FOREACH_END();
+
ZEND_HASH_REVERSE_FOREACH_STR_KEY_VAL(EG(zend_constants), key, zv) {
zend_constant *c = Z_PTR_P(zv);
if (ZEND_CONSTANT_FLAGS(c) & CONST_PERSISTENT) {