diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-01-30 13:35:36 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-01-30 14:00:16 +0100 |
commit | 0dfd918ee7a3520836b875b8c24f0a5f98fbee15 (patch) | |
tree | 2f9645b0f4bcef2f5a3d0ae702bf27470b6f397b /ext/spl/php_spl.c | |
parent | e93bbf4d5d2812c698a4711fc0ff751b170bdf2b (diff) | |
download | php-git-0dfd918ee7a3520836b875b8c24f0a5f98fbee15.tar.gz |
Remove support for __autoload()
There are probably some improvements we can do to the SPL
implementation now that __autoload() is gone. In particular having
EG(autoload_func) as a property zend function, rather than a simple
callback probably doesn't make sense.
Diffstat (limited to 'ext/spl/php_spl.c')
-rw-r--r-- | ext/spl/php_spl.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/ext/spl/php_spl.c b/ext/spl/php_spl.c index c8c45b0d9d..bc81dc3ba2 100644 --- a/ext/spl/php_spl.c +++ b/ext/spl/php_spl.c @@ -302,7 +302,7 @@ static int spl_autoload(zend_string *class_name, zend_string *lc_name, const cha } /* }}} */ /* {{{ proto void spl_autoload(string class_name [, string file_extensions]) - Default implementation for __autoload() */ + Default autoloader implementation */ PHP_FUNCTION(spl_autoload) { int pos_len, pos1_len; @@ -494,7 +494,7 @@ PHP_FUNCTION(spl_autoload_call) } while (0) /* {{{ proto bool spl_autoload_register([mixed autoload_function [, bool throw [, bool prepend]]]) - Register given function as __autoload() implementation */ + Register given function as autoloader */ PHP_FUNCTION(spl_autoload_register) { zend_string *func_name; @@ -668,7 +668,7 @@ skip: } /* }}} */ /* {{{ proto bool spl_autoload_unregister(mixed autoload_function) - Unregister given function as __autoload() implementation */ + Unregister given function as autoloader */ PHP_FUNCTION(spl_autoload_unregister) { zend_string *func_name = NULL; @@ -752,7 +752,7 @@ PHP_FUNCTION(spl_autoload_unregister) } /* }}} */ /* {{{ proto false|array spl_autoload_functions() - Return all registered __autoload() functionns */ + Return all registered autoloader functions */ PHP_FUNCTION(spl_autoload_functions) { zend_function *fptr; @@ -763,14 +763,6 @@ PHP_FUNCTION(spl_autoload_functions) } if (!EG(autoload_func)) { - if ((fptr = zend_hash_find_ptr(EG(function_table), ZSTR_KNOWN(ZEND_STR_MAGIC_AUTOLOAD)))) { - zval tmp; - - array_init(return_value); - ZVAL_STR_COPY(&tmp, ZSTR_KNOWN(ZEND_STR_MAGIC_AUTOLOAD)); - zend_hash_next_index_insert_new(Z_ARR_P(return_value), &tmp); - return; - } RETURN_FALSE; } |