diff options
-rw-r--r-- | ext/tokenizer/tokenizer.c | 12 | ||||
-rw-r--r-- | ext/tokenizer/tokenizer.stub.php | 6 | ||||
-rw-r--r-- | ext/tokenizer/tokenizer_arginfo.h | 10 |
3 files changed, 17 insertions, 11 deletions
diff --git a/ext/tokenizer/tokenizer.c b/ext/tokenizer/tokenizer.c index 91ace6f701..4a4283f11e 100644 --- a/ext/tokenizer/tokenizer.c +++ b/ext/tokenizer/tokenizer.c @@ -24,6 +24,7 @@ #include "php_ini.h" #include "ext/standard/info.h" #include "php_tokenizer.h" +#include "tokenizer_arginfo.h" #include "zend.h" #include "zend_exceptions.h" @@ -42,17 +43,6 @@ void tokenizer_token_get_all_register_constants(INIT_FUNC_ARGS) { REGISTER_LONG_CONSTANT("TOKEN_PARSE", TOKEN_PARSE, CONST_CS|CONST_PERSISTENT); } -/* {{{ arginfo */ -ZEND_BEGIN_ARG_INFO_EX(arginfo_token_get_all, 0, 0, 1) - ZEND_ARG_INFO(0, source) - ZEND_ARG_INFO(0, flags) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_token_name, 0, 0, 1) - ZEND_ARG_INFO(0, token) -ZEND_END_ARG_INFO() -/* }}} */ - /* {{{ tokenizer_functions[] * * Every user visible function must have an entry in tokenizer_functions[]. diff --git a/ext/tokenizer/tokenizer.stub.php b/ext/tokenizer/tokenizer.stub.php new file mode 100644 index 0000000000..8abcd37811 --- /dev/null +++ b/ext/tokenizer/tokenizer.stub.php @@ -0,0 +1,6 @@ +<?php + +/** @return array|false */ +function token_get_all(string $source, int $flags = 0) {} + +function token_name(int $token): string {} diff --git a/ext/tokenizer/tokenizer_arginfo.h b/ext/tokenizer/tokenizer_arginfo.h new file mode 100644 index 0000000000..f1b601358e --- /dev/null +++ b/ext/tokenizer/tokenizer_arginfo.h @@ -0,0 +1,10 @@ +/* This is a generated file, edit the .stub.php file instead. */ + +ZEND_BEGIN_ARG_INFO_EX(arginfo_token_get_all, 0, 0, 1) + ZEND_ARG_TYPE_INFO(0, source, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_token_name, 0, 1, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, token, IS_LONG, 0) +ZEND_END_ARG_INFO() |