summaryrefslogtreecommitdiff
path: root/Zend/zend_execute.h
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-06-09 17:36:36 +0200
committerNikita Popov <nikita.ppv@gmail.com>2020-06-10 09:38:47 +0200
commit5b59d4915cfa7c12ddf65281e4f7f81d6985d27f (patch)
tree4985494346993cae84eb4f54969173b19cd7badd /Zend/zend_execute.h
parent68dd6cc92b81cc2253cdfcdc53823ad6527d2e05 (diff)
downloadphp-git-5b59d4915cfa7c12ddf65281e4f7f81d6985d27f.tar.gz
Cleanup SPL autoload implementation
Replace EG(autoload_func) with a C level zend_autoload hook. This avoids having to do one indirection through PHP function calls. The need for EG(autoload_func) was a leftover from the __autoload() implementation. Additionally, drop special-casing of spl_autoload(), and instead register it just like any other autoloading function. This fixes bug #71236 as a side-effect. Finally, change spl_autoload_functions() to always return an array. The distinction between false and an empty array no longer makes sense here. Closes GH-5696.
Diffstat (limited to 'Zend/zend_execute.h')
-rw-r--r--Zend/zend_execute.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/Zend/zend_execute.h b/Zend/zend_execute.h
index 58e1bbc2a9..0aa959d11f 100644
--- a/Zend/zend_execute.h
+++ b/Zend/zend_execute.h
@@ -31,6 +31,9 @@ struct _zend_fcall_info;
ZEND_API extern void (*zend_execute_ex)(zend_execute_data *execute_data);
ZEND_API extern void (*zend_execute_internal)(zend_execute_data *execute_data, zval *return_value);
+/* The lc_name may be stack allocated! */
+ZEND_API extern zend_class_entry *(*zend_autoload)(zend_string *name, zend_string *lc_name);
+
void init_executor(void);
void shutdown_executor(void);
void shutdown_destructors(void);