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(
|
|
|
|
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(
|
|
|
|
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(
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|