diff options
author | Zeev Suraski <zeev@php.net> | 2004-02-25 09:25:37 +0000 |
---|---|---|
committer | Zeev Suraski <zeev@php.net> | 2004-02-25 09:25:37 +0000 |
commit | 36a751840dc6382ae89498ed132911047d47a01b (patch) | |
tree | 4036833a3cdfadfdd0a8f545f84dae297f97452b /Zend/zend_API.c | |
parent | 0cfb59fce4cb45b47552ad011eb002e3252cc47f (diff) | |
download | php-git-36a751840dc6382ae89498ed132911047d47a01b.tar.gz |
- Abstract methods cannot have defaults for arguments
- Make function foo($a, $b=null) satisfy both foo($a) and foo($a, $b)
prototypes
Diffstat (limited to 'Zend/zend_API.c')
-rw-r--r-- | Zend/zend_API.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 3a82e9a9bb..90c12fa826 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -1220,11 +1220,14 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, zend_function_entr if (ptr->arg_info) { internal_function->arg_info = ptr->arg_info+1; internal_function->num_args = ptr->num_args; + /* Currently you cannot denote that the function can accept less arguments than num_args */ + internal_function->required_num_args = ptr->num_args; internal_function->pass_rest_by_reference = ptr->arg_info[0].pass_by_reference; internal_function->return_reference = ptr->arg_info[0].return_reference; } else { internal_function->arg_info = NULL; internal_function->num_args = 0; + internal_function->required_num_args = 0; internal_function->pass_rest_by_reference = 0; internal_function->return_reference = 0; } |