summaryrefslogtreecommitdiff
path: root/Zend/zend_execute_API.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2018-06-25 19:53:58 +0300
committerDmitry Stogov <dmitry@zend.com>2018-06-25 19:53:58 +0300
commit7f67513ca3c71c0d84a272d1572101ef45203b30 (patch)
tree190db98954e4fdb1b8b9ae3591783dcbbb73b6c8 /Zend/zend_execute_API.c
parent30f79977621051d002d6b153bf6ab1525c2a028c (diff)
downloadphp-git-7f67513ca3c71c0d84a272d1572101ef45203b30.tar.gz
Lazy function copying from op_cache SHM into process memory
Diffstat (limited to 'Zend/zend_execute_API.c')
-rw-r--r--Zend/zend_execute_API.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c
index 01f6fbf4a9..8d39de0101 100644
--- a/Zend/zend_execute_API.c
+++ b/Zend/zend_execute_API.c
@@ -902,9 +902,10 @@ ZEND_API zend_class_entry *zend_lookup_class_ex(zend_string *name, const zval *k
}
if (!EG(autoload_func)) {
- zval *zv = zend_hash_find_ex(EG(function_table), ZSTR_KNOWN(ZEND_STR_MAGIC_AUTOLOAD), 1);
- if (zv) {
- EG(autoload_func) = (zend_function*)Z_PTR_P(zv);
+ zend_function *func = zend_fetch_function(ZSTR_KNOWN(ZEND_STR_MAGIC_AUTOLOAD));
+
+ if (func) {
+ EG(autoload_func) = func;
} else {
if (!key) {
zend_string_release_ex(lc_name, 0);