summaryrefslogtreecommitdiff
path: root/ext/spl/php_spl.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/spl/php_spl.c')
-rw-r--r--ext/spl/php_spl.c20
1 files changed, 5 insertions, 15 deletions
diff --git a/ext/spl/php_spl.c b/ext/spl/php_spl.c
index b147a96128..f3bf3969ee 100644
--- a/ext/spl/php_spl.c
+++ b/ext/spl/php_spl.c
@@ -1,7 +1,5 @@
/*
+----------------------------------------------------------------------+
- | PHP Version 7 |
- +----------------------------------------------------------------------+
| Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
@@ -306,7 +304,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;
@@ -498,7 +496,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;
@@ -517,7 +515,7 @@ PHP_FUNCTION(spl_autoload_register)
}
if (ZEND_NUM_ARGS()) {
- if (!zend_is_callable_ex(zcallable, NULL, IS_CALLABLE_STRICT, &func_name, &fcc, &error)) {
+ if (!zend_is_callable_ex(zcallable, NULL, 0, &func_name, &fcc, &error)) {
alfi.ce = fcc.calling_scope;
alfi.func_ptr = fcc.function_handler;
obj_ptr = fcc.object;
@@ -672,7 +670,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;
@@ -756,7 +754,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;
@@ -767,14 +765,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;
}