summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/mbstring/mbstring.c4
-rw-r--r--ext/mysqli/mysqli_fe.c15
-rw-r--r--ext/opcache/Optimizer/block_pass.c4
-rw-r--r--ext/pdo/pdo_dbh.c10
-rw-r--r--ext/reflection/php_reflection.c33
-rw-r--r--ext/reflection/tests/ReflectionFunction_isVariadic_basic.phpt18
-rw-r--r--ext/reflection/tests/ReflectionParameter_canBePassedByValue.phpt4
-rw-r--r--ext/reflection/tests/ReflectionParameter_isVariadic_basic.phpt24
-rw-r--r--ext/reflection/tests/ReflectionParameter_toString_basic.phpt3
-rw-r--r--ext/spl/spl_directory.c3
-rw-r--r--ext/spl/tests/bug51532.phpt2
-rw-r--r--ext/sqlite3/sqlite3.c2
-rw-r--r--ext/standard/basic_functions.c15
-rw-r--r--ext/tokenizer/tokenizer_data.c6
14 files changed, 113 insertions, 30 deletions
diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c
index 4e430b6ea2..168b133c64 100644
--- a/ext/mbstring/mbstring.c
+++ b/ext/mbstring/mbstring.c
@@ -402,10 +402,10 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_mb_convert_kana, 0, 0, 1)
ZEND_ARG_INFO(0, encoding)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_mb_convert_variables, 1, 0, 3)
+ZEND_BEGIN_ARG_INFO_EX(arginfo_mb_convert_variables, 0, 0, 3)
ZEND_ARG_INFO(0, to)
ZEND_ARG_INFO(0, from)
- ZEND_ARG_INFO(1, ...)
+ ZEND_ARG_VARIADIC_INFO(1, vars)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_mb_encode_numericentity, 0, 0, 2)
diff --git a/ext/mysqli/mysqli_fe.c b/ext/mysqli/mysqli_fe.c
index 6f2e404087..eb94ff65bb 100644
--- a/ext/mysqli/mysqli_fe.c
+++ b/ext/mysqli/mysqli_fe.c
@@ -43,23 +43,28 @@
#define MYSQLI_ZEND_ARG_OBJ_INFO_STMT() ZEND_ARG_INFO(0, stmt)
#endif
-ZEND_BEGIN_ARG_INFO(arginfo_mysqli_stmt_bind_result, 1)
+ZEND_BEGIN_ARG_INFO(arginfo_mysqli_stmt_bind_result, 0)
MYSQLI_ZEND_ARG_OBJ_INFO_STMT()
+ ZEND_ARG_VARIADIC_INFO(1, vars)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO(arginfo_mysqli_stmt_bind_param, 1)
+ZEND_BEGIN_ARG_INFO(arginfo_mysqli_stmt_bind_param, 0)
MYSQLI_ZEND_ARG_OBJ_INFO_STMT()
ZEND_ARG_INFO(0, types)
+ ZEND_ARG_VARIADIC_INFO(1, vars)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO(arginfo_class_mysqli_stmt_bind_result, 1)
+ZEND_BEGIN_ARG_INFO(arginfo_class_mysqli_stmt_bind_result, 0)
+ ZEND_ARG_VARIADIC_INFO(1, vars)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO(arginfo_class_mysqli_stmt_bind_param, 1)
+ZEND_BEGIN_ARG_INFO(arginfo_class_mysqli_stmt_bind_param, 0)
ZEND_ARG_INFO(0, types)
+ ZEND_ARG_VARIADIC_INFO(1, vars)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO(all_args_force_by_ref, 1)
+ZEND_BEGIN_ARG_INFO(all_args_force_by_ref, 0)
+ ZEND_ARG_VARIADIC_INFO(1, vars)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_poll, 0, 0, 4)
diff --git a/ext/opcache/Optimizer/block_pass.c b/ext/opcache/Optimizer/block_pass.c
index 1c34cffbf7..a4e661e3f8 100644
--- a/ext/opcache/Optimizer/block_pass.c
+++ b/ext/opcache/Optimizer/block_pass.c
@@ -1899,7 +1899,7 @@ next_target_znz:
#endif
/* Find a set of variables which are used outside of the block where they are
- * defined. We won't apply some optimization patterns for sush variables. */
+ * defined. We won't apply some optimization patterns for such variables. */
static void zend_t_usage(zend_code_block *block, zend_op_array *op_array, char *used_ext)
{
zend_code_block *next_block = block->next;
@@ -1931,6 +1931,7 @@ static void zend_t_usage(zend_code_block *block, zend_op_array *op_array, char *
if (RESULT_USED(opline)) {
if (!defined_here[VAR_NUM(ZEND_RESULT(opline).var)] && !used_ext[VAR_NUM(ZEND_RESULT(opline).var)] &&
(opline->opcode == ZEND_RECV || opline->opcode == ZEND_RECV_INIT ||
+ opline->opcode == ZEND_RECV_VARIADIC ||
(opline->opcode == ZEND_OP_DATA && ZEND_RESULT_TYPE(opline) == IS_TMP_VAR) ||
opline->opcode == ZEND_ADD_ARRAY_ELEMENT)) {
/* these opcodes use the result as argument */
@@ -2015,6 +2016,7 @@ static void zend_t_usage(zend_code_block *block, zend_op_array *op_array, char *
if (opline->opcode == ZEND_RECV ||
opline->opcode == ZEND_RECV_INIT ||
+ opline->opcode == ZEND_RECV_VARIADIC ||
opline->opcode == ZEND_ADD_ARRAY_ELEMENT) {
if (ZEND_OP1_TYPE(opline) == IS_VAR || ZEND_OP1_TYPE(opline) == IS_TMP_VAR) {
usage[VAR_NUM(ZEND_RESULT(opline).var)] = 1;
diff --git a/ext/pdo/pdo_dbh.c b/ext/pdo/pdo_dbh.c
index aec388c03f..ee74e85928 100644
--- a/ext/pdo/pdo_dbh.c
+++ b/ext/pdo/pdo_dbh.c
@@ -1328,16 +1328,12 @@ int pdo_hash_methods(pdo_dbh_t *dbh, int kind TSRMLS_DC)
} else {
ifunc->required_num_args = info->required_num_args;
}
- if (info->pass_rest_by_reference) {
- if (info->pass_rest_by_reference == ZEND_SEND_PREFER_REF) {
- ifunc->fn_flags |= ZEND_ACC_PASS_REST_PREFER_REF;
- } else {
- ifunc->fn_flags |= ZEND_ACC_PASS_REST_BY_REFERENCE;
- }
- }
if (info->return_reference) {
ifunc->fn_flags |= ZEND_ACC_RETURN_REFERENCE;
}
+ if (funcs->arg_info[funcs->num_args].is_variadic) {
+ ifunc->fn_flags |= ZEND_ACC_VARIADIC;
+ }
} else {
ifunc->arg_info = NULL;
ifunc->num_args = 0;
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index b1f7484f24..cc148b39c5 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -681,8 +681,8 @@ static zend_op* _get_recv_op(zend_op_array *op_array, zend_uint offset)
++offset;
while (op < end) {
- if ((op->opcode == ZEND_RECV || op->opcode == ZEND_RECV_INIT)
- && op->op1.num == (long)offset)
+ if ((op->opcode == ZEND_RECV || op->opcode == ZEND_RECV_INIT
+ || op->opcode == ZEND_RECV_VARIADIC) && op->op1.num == (long)offset)
{
return op;
}
@@ -715,6 +715,9 @@ static void _parameter_string(string *str, zend_function *fptr, struct _zend_arg
if (arg_info->pass_by_reference) {
string_write(str, "&", sizeof("&")-1);
}
+ if (arg_info->is_variadic) {
+ string_write(str, "...", sizeof("...")-1);
+ }
if (arg_info->name) {
string_printf(str, "$%s", arg_info->name);
} else {
@@ -2652,6 +2655,22 @@ ZEND_METHOD(reflection_parameter, getDefaultValueConstantName)
}
/* }}} */
+/* {{{ proto public bool ReflectionParameter::isVariadic()
+ Returns whether this parameter is a variadic parameter */
+ZEND_METHOD(reflection_parameter, isVariadic)
+{
+ reflection_object *intern;
+ parameter_reference *param;
+
+ if (zend_parse_parameters_none() == FAILURE) {
+ return;
+ }
+ GET_REFLECTION_OBJECT_PTR(param);
+
+ RETVAL_BOOL(param->arg_info->is_variadic);
+}
+/* }}} */
+
/* {{{ proto public static mixed ReflectionMethod::export(mixed class, string name [, bool return]) throws ReflectionException
Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */
ZEND_METHOD(reflection_method, export)
@@ -3095,6 +3114,14 @@ ZEND_METHOD(reflection_function, isGenerator)
}
/* }}} */
+/* {{{ proto public bool ReflectionFunction::isVariadic()
+ Returns whether this function is variadic */
+ZEND_METHOD(reflection_function, isVariadic)
+{
+ _function_check_flag(INTERNAL_FUNCTION_PARAM_PASSTHRU, ZEND_ACC_VARIADIC);
+}
+/* }}} */
+
/* {{{ proto public bool ReflectionFunction::inNamespace()
Returns whether this function is defined in namespace */
ZEND_METHOD(reflection_function, inNamespace)
@@ -5720,6 +5747,7 @@ static const zend_function_entry reflection_function_abstract_functions[] = {
ZEND_ME(reflection_function, isInternal, arginfo_reflection__void, 0)
ZEND_ME(reflection_function, isUserDefined, arginfo_reflection__void, 0)
ZEND_ME(reflection_function, isGenerator, arginfo_reflection__void, 0)
+ ZEND_ME(reflection_function, isVariadic, arginfo_reflection__void, 0)
ZEND_ME(reflection_function, getClosureThis, arginfo_reflection__void, 0)
ZEND_ME(reflection_function, getClosureScopeClass, arginfo_reflection__void, 0)
ZEND_ME(reflection_function, getDocComment, arginfo_reflection__void, 0)
@@ -6022,6 +6050,7 @@ static const zend_function_entry reflection_parameter_functions[] = {
ZEND_ME(reflection_parameter, getDefaultValue, arginfo_reflection__void, 0)
ZEND_ME(reflection_parameter, isDefaultValueConstant, arginfo_reflection__void, 0)
ZEND_ME(reflection_parameter, getDefaultValueConstantName, arginfo_reflection__void, 0)
+ ZEND_ME(reflection_parameter, isVariadic, arginfo_reflection__void, 0)
PHP_FE_END
};
diff --git a/ext/reflection/tests/ReflectionFunction_isVariadic_basic.phpt b/ext/reflection/tests/ReflectionFunction_isVariadic_basic.phpt
new file mode 100644
index 0000000000..50b6bb495e
--- /dev/null
+++ b/ext/reflection/tests/ReflectionFunction_isVariadic_basic.phpt
@@ -0,0 +1,18 @@
+--TEST--
+ReflectionFunction::isVariadic()
+--FILE--
+<?php
+
+function test1($args) {}
+function test2(...$args) {}
+function test3($arg, ...$args) {}
+
+var_dump((new ReflectionFunction('test1'))->isVariadic());
+var_dump((new ReflectionFunction('test2'))->isVariadic());
+var_dump((new ReflectionFunction('test3'))->isVariadic());
+
+?>
+--EXPECT--
+bool(false)
+bool(true)
+bool(true)
diff --git a/ext/reflection/tests/ReflectionParameter_canBePassedByValue.phpt b/ext/reflection/tests/ReflectionParameter_canBePassedByValue.phpt
index 82c6200122..4772f6548d 100644
--- a/ext/reflection/tests/ReflectionParameter_canBePassedByValue.phpt
+++ b/ext/reflection/tests/ReflectionParameter_canBePassedByValue.phpt
@@ -61,6 +61,10 @@ Name: SORT_REGULAR_or_SORT_NUMERIC_or_SORT_STRING
Is passed by reference: yes
Can be passed by value: yes
+Name: more_array_and_sort_options
+Is passed by reference: yes
+Can be passed by value: yes
+
=> sort:
Name: arg
diff --git a/ext/reflection/tests/ReflectionParameter_isVariadic_basic.phpt b/ext/reflection/tests/ReflectionParameter_isVariadic_basic.phpt
new file mode 100644
index 0000000000..370edc388d
--- /dev/null
+++ b/ext/reflection/tests/ReflectionParameter_isVariadic_basic.phpt
@@ -0,0 +1,24 @@
+--TEST--
+ReflectionParameter::isVariadic()
+--FILE--
+<?php
+
+function test1($args) {}
+function test2(...$args) {}
+function test3($arg, ...$args) {}
+
+$r1 = new ReflectionFunction('test1');
+$r2 = new ReflectionFunction('test2');
+$r3 = new ReflectionFunction('test3');
+
+var_dump($r1->getParameters()[0]->isVariadic());
+var_dump($r2->getParameters()[0]->isVariadic());
+var_dump($r3->getParameters()[0]->isVariadic());
+var_dump($r3->getParameters()[1]->isVariadic());
+
+?>
+--EXPECT--
+bool(false)
+bool(true)
+bool(false)
+bool(true)
diff --git a/ext/reflection/tests/ReflectionParameter_toString_basic.phpt b/ext/reflection/tests/ReflectionParameter_toString_basic.phpt
index 268ced15ec..d1a23c758d 100644
--- a/ext/reflection/tests/ReflectionParameter_toString_basic.phpt
+++ b/ext/reflection/tests/ReflectionParameter_toString_basic.phpt
@@ -4,7 +4,7 @@ ReflectionParameter::__toString()
Stefan Koopmanschap <stefan@stefankoopmanschap.nl>
--FILE--
<?php
-function ReflectionParameterTest($test, $test2 = null) {
+function ReflectionParameterTest($test, $test2 = null, ...$test3) {
echo $test;
}
$reflect = new ReflectionFunction('ReflectionParameterTest');
@@ -17,4 +17,5 @@ foreach($params as $key => $value) {
--EXPECT--
Parameter #0 [ <required> $test ]
Parameter #1 [ <optional> $test2 = NULL ]
+Parameter #2 [ <optional> ...$test3 ]
==DONE==
diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c
index 3dc7b7925c..f73e8ee9f0 100644
--- a/ext/spl/spl_directory.c
+++ b/ext/spl/spl_directory.c
@@ -2938,8 +2938,9 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_file_object_fgetss, 0, 0, 0)
ZEND_ARG_INFO(0, allowable_tags)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_file_object_fscanf, 1, 0, 1)
+ZEND_BEGIN_ARG_INFO_EX(arginfo_file_object_fscanf, 0, 0, 1)
ZEND_ARG_INFO(0, format)
+ ZEND_ARG_VARIADIC_INFO(1, vars)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_file_object_fwrite, 0, 0, 1)
diff --git a/ext/spl/tests/bug51532.phpt b/ext/spl/tests/bug51532.phpt
index 3a0722b2af..26eaa8f82f 100644
--- a/ext/spl/tests/bug51532.phpt
+++ b/ext/spl/tests/bug51532.phpt
@@ -4,7 +4,7 @@ SPL: Allow valid extension of SplFileObject::fscanf
<?php
class A extends SplFileObject {
- public function fscanf($format) {
+ public function fscanf($format, &...$vars) {
}
}
diff --git a/ext/sqlite3/sqlite3.c b/ext/sqlite3/sqlite3.c
index 2aef0414aa..19bf58deb8 100644
--- a/ext/sqlite3/sqlite3.c
+++ b/ext/sqlite3/sqlite3.c
@@ -1890,7 +1890,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_sqlite3stmt_bindvalue, 0, 0, 2)
ZEND_ARG_INFO(0, type)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO(arginfo_sqlite3stmt_construct, 1)
+ZEND_BEGIN_ARG_INFO_EX(arginfo_sqlite3stmt_construct, 0, 0, 1)
ZEND_ARG_INFO(0, sqlite3)
ZEND_END_ARG_INFO()
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index 3e5084e837..7db20d1a62 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -288,11 +288,11 @@ ZEND_BEGIN_ARG_INFO(arginfo_reset, 0)
ZEND_ARG_INFO(1, arg)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO(arginfo_current, ZEND_SEND_PREFER_REF)
+ZEND_BEGIN_ARG_INFO(arginfo_current, 0)
ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, arg)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO(arginfo_key, ZEND_SEND_PREFER_REF)
+ZEND_BEGIN_ARG_INFO(arginfo_key, 0)
ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, arg)
ZEND_END_ARG_INFO()
@@ -564,13 +564,14 @@ ZEND_BEGIN_ARG_INFO(arginfo_array_udiff_uassoc, 0)
ZEND_ARG_INFO(0, callback_key_comp_func)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_array_multisort, ZEND_SEND_PREFER_REF, 0, 1)
+ZEND_BEGIN_ARG_INFO_EX(arginfo_array_multisort, 0, 0, 1)
ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, arr1) /* ARRAY_INFO(0, arg1, 0) */
ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, SORT_ASC_or_SORT_DESC)
ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, SORT_REGULAR_or_SORT_NUMERIC_or_SORT_STRING)
ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, arr2)
ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, SORT_ASC_or_SORT_DESC)
ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, SORT_REGULAR_or_SORT_NUMERIC_or_SORT_STRING)
+ ZEND_ARG_VARIADIC_INFO(ZEND_SEND_PREFER_REF, more_array_and_sort_options)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_array_rand, 0, 0, 1)
@@ -1139,10 +1140,10 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_fgetss, 0, 0, 1)
ZEND_ARG_INFO(0, allowable_tags)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_fscanf, 1, 0, 2)
+ZEND_BEGIN_ARG_INFO_EX(arginfo_fscanf, 0, 0, 2)
ZEND_ARG_INFO(0, stream)
ZEND_ARG_INFO(0, format)
- ZEND_ARG_INFO(1, ...)
+ ZEND_ARG_VARIADIC_INFO(1, vars)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_fwrite, 0, 0, 2)
@@ -2450,10 +2451,10 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_str_pad, 0, 0, 2)
ZEND_ARG_INFO(0, pad_type)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_sscanf, 1, 0, 2)
+ZEND_BEGIN_ARG_INFO_EX(arginfo_sscanf, 0, 0, 2)
ZEND_ARG_INFO(0, str)
ZEND_ARG_INFO(0, format)
- ZEND_ARG_INFO(1, ...)
+ ZEND_ARG_VARIADIC_INFO(1, vars)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO(arginfo_str_rot13, 0)
diff --git a/ext/tokenizer/tokenizer_data.c b/ext/tokenizer/tokenizer_data.c
index 57b29e1dd7..8c4786575e 100644
--- a/ext/tokenizer/tokenizer_data.c
+++ b/ext/tokenizer/tokenizer_data.c
@@ -38,6 +38,7 @@ void tokenizer_register_constants(INIT_FUNC_ARGS) {
REGISTER_LONG_CONSTANT("T_LOGICAL_XOR", T_LOGICAL_XOR, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("T_LOGICAL_AND", T_LOGICAL_AND, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("T_PRINT", T_PRINT, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("T_YIELD", T_YIELD, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("T_SR_EQUAL", T_SR_EQUAL, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("T_SL_EQUAL", T_SL_EQUAL, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("T_XOR_EQUAL", T_XOR_EQUAL, CONST_CS | CONST_PERSISTENT);
@@ -108,7 +109,6 @@ void tokenizer_register_constants(INIT_FUNC_ARGS) {
REGISTER_LONG_CONSTANT("T_FUNCTION", T_FUNCTION, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("T_CONST", T_CONST, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("T_RETURN", T_RETURN, CONST_CS | CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("T_YIELD", T_YIELD, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("T_TRY", T_TRY, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("T_CATCH", T_CATCH, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("T_FINALLY", T_FINALLY, CONST_CS | CONST_PERSISTENT);
@@ -158,6 +158,7 @@ void tokenizer_register_constants(INIT_FUNC_ARGS) {
REGISTER_LONG_CONSTANT("T_NS_C", T_NS_C, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("T_DIR", T_DIR, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("T_NS_SEPARATOR", T_NS_SEPARATOR, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("T_ELLIPSIS", T_ELLIPSIS, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("T_DOUBLE_COLON", T_PAAMAYIM_NEKUDOTAYIM, CONST_CS | CONST_PERSISTENT);
}
@@ -174,6 +175,7 @@ char *get_token_type_name(int token_type)
case T_LOGICAL_XOR: return "T_LOGICAL_XOR";
case T_LOGICAL_AND: return "T_LOGICAL_AND";
case T_PRINT: return "T_PRINT";
+ case T_YIELD: return "T_YIELD";
case T_SR_EQUAL: return "T_SR_EQUAL";
case T_SL_EQUAL: return "T_SL_EQUAL";
case T_XOR_EQUAL: return "T_XOR_EQUAL";
@@ -244,7 +246,6 @@ char *get_token_type_name(int token_type)
case T_FUNCTION: return "T_FUNCTION";
case T_CONST: return "T_CONST";
case T_RETURN: return "T_RETURN";
- case T_YIELD: return "T_YIELD";
case T_TRY: return "T_TRY";
case T_CATCH: return "T_CATCH";
case T_FINALLY: return "T_FINALLY";
@@ -294,6 +295,7 @@ char *get_token_type_name(int token_type)
case T_NS_C: return "T_NS_C";
case T_DIR: return "T_DIR";
case T_NS_SEPARATOR: return "T_NS_SEPARATOR";
+ case T_ELLIPSIS: return "T_ELLIPSIS";
}
return "UNKNOWN";