diff options
author | Máté Kocsis <kocsismate@woohoolabs.com> | 2020-04-06 11:02:13 +0200 |
---|---|---|
committer | Máté Kocsis <kocsismate@woohoolabs.com> | 2020-04-08 18:37:51 +0200 |
commit | 3709e74b5e495e210ada8039ed81fafa9cbadcdb (patch) | |
tree | b7347572b1e22a2a27a45260b4f4773bf916b158 /Zend/zend_compile.h | |
parent | b0d8f012f95ba1f2d8dba238c93baf3afb73b78e (diff) | |
download | php-git-3709e74b5e495e210ada8039ed81fafa9cbadcdb.tar.gz |
Store default parameter values of internal functions in arg info
Closes GH-5353. From now on, PHP will have reflection information
about default values of parameters of internal functions.
Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
Diffstat (limited to 'Zend/zend_compile.h')
-rw-r--r-- | Zend/zend_compile.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h index d6ddb0760f..5dd4c39d6a 100644 --- a/Zend/zend_compile.h +++ b/Zend/zend_compile.h @@ -374,12 +374,14 @@ typedef struct _zend_class_constant { typedef struct _zend_internal_arg_info { const char *name; zend_type type; + const char *default_value; } zend_internal_arg_info; /* arg_info for user functions */ typedef struct _zend_arg_info { zend_string *name; zend_type type; + zend_string *default_value; } zend_arg_info; /* the following structure repeats the layout of zend_internal_arg_info, @@ -390,6 +392,7 @@ typedef struct _zend_arg_info { typedef struct _zend_internal_function_info { zend_uintptr_t required_num_args; zend_type type; + const char *default_value; } zend_internal_function_info; struct _zend_op_array { @@ -765,9 +768,13 @@ ZEND_API void function_add_ref(zend_function *function); /* helper functions in zend_language_scanner.l */ +struct _zend_arena; + ZEND_API zend_op_array *compile_file(zend_file_handle *file_handle, int type); ZEND_API zend_op_array *compile_string(zval *source_string, const char *filename); ZEND_API zend_op_array *compile_filename(int type, zval *filename); +ZEND_API zend_ast *zend_compile_string_to_ast( + zend_string *code, struct _zend_arena **ast_arena, const char *filename); ZEND_API int zend_execute_scripts(int type, zval *retval, int file_count, ...); ZEND_API int open_file_for_scanning(zend_file_handle *file_handle); ZEND_API void init_op_array(zend_op_array *op_array, zend_uchar type, int initial_ops_size); |