summaryrefslogtreecommitdiff
path: root/Zend/zend_API.h
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2008-02-01 21:27:55 +0000
committerMarcus Boerger <helly@php.net>2008-02-01 21:27:55 +0000
commite8a8acdf39a3b4256a671bbb1f6a399baa70cc27 (patch)
treef3e1d1a713b5c3de96ce69ee207cf71766413b24 /Zend/zend_API.h
parent4ac63900981882f791ec00ef1916545d0d107aff (diff)
downloadphp-git-e8a8acdf39a3b4256a671bbb1f6a399baa70cc27.tar.gz
[DOC]
- Fix callable/static mess, the following will now all result in a E_STRICT . binding a dynamic function as a static callback . static call of a dynamic function . is_callable() on a static binding to a dynamic function # [marcus@frodo PHP_5_3]$ php -a -d error_reporting=8191 # make: `sapi/cli/php' is up to date. # Interactive shell # # php > class t{ function f() { echo "Funny\n"; } } # php > $c = array("t","f"); # php > call_user_func($c); # # Strict Standards: call_user_func() expects parameter 1 to be a valid callback, non-static method t::f() cannot be called statically in php shell code on line 1 # Funny # php > var_dump(is_callable($c)); # # Strict Standards: Non-static method t::f() cannot be called statically in php shell code on line 1 # bool(true) # php > t::f(); # # Strict Standards: Non-static method t::f() should not be called statically in php shell code on line 1 # Funny # php >
Diffstat (limited to 'Zend/zend_API.h')
-rw-r--r--Zend/zend_API.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/Zend/zend_API.h b/Zend/zend_API.h
index 154590397c..cd5f710473 100644
--- a/Zend/zend_API.h
+++ b/Zend/zend_API.h
@@ -228,7 +228,7 @@ ZEND_API void zend_wrong_param_count(TSRMLS_D);
#define IS_CALLABLE_STRICT (IS_CALLABLE_CHECK_IS_STATIC)
-ZEND_API zend_bool zend_is_callable_ex(zval *callable, uint check_flags, char **callable_name, int *callable_name_len, zend_class_entry **ce_ptr, zend_function **fptr_ptr, zval ***zobj_ptr_ptr TSRMLS_DC);
+ZEND_API zend_bool zend_is_callable_ex(zval *callable, uint check_flags, char **callable_name, int *callable_name_len, zend_class_entry **ce_ptr, zend_function **fptr_ptr, zval ***zobj_ptr_ptr, char **error TSRMLS_DC);
ZEND_API zend_bool zend_is_callable(zval *callable, uint check_flags, char **callable_name);
ZEND_API zend_bool zend_make_callable(zval *callable, char **callable_name TSRMLS_DC);
ZEND_API const char *zend_get_module_version(const char *module_name);
@@ -409,8 +409,9 @@ ZEND_API extern zend_fcall_info_cache empty_fcall_info_cache;
* fci->param_count = 0;
* fci->params = NULL;
* The callable_name argument may be NULL.
+ * Set check_flags to IS_CALLABLE_STRICT for every new usage!
*/
-ZEND_API int zend_fcall_info_init(zval *callable, zend_fcall_info *fci, zend_fcall_info_cache *fcc, char **callable_name TSRMLS_DC);
+ZEND_API int zend_fcall_info_init(zval *callable, uint check_flags, zend_fcall_info *fci, zend_fcall_info_cache *fcc, char **callable_name, char **error TSRMLS_DC);
/** Clear argumens connected with zend_fcall_info *fci
* If free_mem is not zero then the params array gets free'd as well