菜谱项目

variadicDefaultValue.test 564B

123456789101112131415161718192021222324252627
  1. Invalid variadic function
  2. -----
  3. <?php
  4. function foo(...$foo = []) {}
  5. -----
  6. Variadic parameter cannot have a default value from 2:24 to 2:25
  7. array(
  8. 0: Stmt_Function(
  9. byRef: false
  10. name: foo
  11. params: array(
  12. 0: Param(
  13. type: null
  14. byRef: false
  15. variadic: true
  16. name: foo
  17. default: Expr_Array(
  18. items: array(
  19. )
  20. )
  21. )
  22. )
  23. returnType: null
  24. stmts: array(
  25. )
  26. )
  27. )