readonlyMethod.test 763 B

1234567891011121314151617181920212223242526272829303132333435
  1. Methods cannot be readonly
  2. -----
  3. <?php class A { readonly function foo() {} }
  4. -----
  5. !!php7
  6. Method foo() cannot be readonly from 1:17 to 1:24
  7. array(
  8. 0: Stmt_Class(
  9. attrGroups: array(
  10. )
  11. flags: 0
  12. name: Identifier(
  13. name: A
  14. )
  15. extends: null
  16. implements: array(
  17. )
  18. stmts: array(
  19. 0: Stmt_ClassMethod(
  20. attrGroups: array(
  21. )
  22. flags: MODIFIER_READONLY (64)
  23. byRef: false
  24. name: Identifier(
  25. name: foo
  26. )
  27. params: array(
  28. )
  29. returnType: null
  30. stmts: array(
  31. )
  32. )
  33. )
  34. )
  35. )