2014-03-26 18:23:30 +01:00
|
|
|
Invalid variadic function
|
|
|
|
-----
|
|
|
|
<?php
|
|
|
|
function foo(...$foo = []) {}
|
|
|
|
-----
|
2015-04-18 21:20:45 +02:00
|
|
|
Variadic parameter cannot have a default value from 2:24 to 2:25
|
2016-10-09 00:59:44 +02:00
|
|
|
array(
|
|
|
|
0: Stmt_Function(
|
2020-09-13 21:01:17 +02:00
|
|
|
attrGroups: array(
|
|
|
|
)
|
2016-10-09 00:59:44 +02:00
|
|
|
byRef: false
|
2017-04-28 19:09:39 +02:00
|
|
|
name: Identifier(
|
|
|
|
name: foo
|
|
|
|
)
|
2016-10-09 00:59:44 +02:00
|
|
|
params: array(
|
|
|
|
0: Param(
|
2020-09-13 21:01:17 +02:00
|
|
|
attrGroups: array(
|
|
|
|
)
|
2020-06-07 18:52:12 +02:00
|
|
|
flags: 0
|
2016-10-09 00:59:44 +02:00
|
|
|
type: null
|
|
|
|
byRef: false
|
|
|
|
variadic: true
|
2017-01-19 23:38:40 +01:00
|
|
|
var: Expr_Variable(
|
2017-01-19 23:23:38 +01:00
|
|
|
name: foo
|
|
|
|
)
|
2016-10-09 00:59:44 +02:00
|
|
|
default: Expr_Array(
|
|
|
|
items: array(
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
returnType: null
|
|
|
|
stmts: array(
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|