modifier.test 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. Invalid modifier combination
  2. -----
  3. <?php class A { public public $a; }
  4. -----
  5. Multiple access type modifiers are not allowed on line 1
  6. -----
  7. <?php class A { public protected $a; }
  8. -----
  9. Multiple access type modifiers are not allowed on line 1
  10. -----
  11. <?php class A { abstract abstract a(); }
  12. -----
  13. Multiple abstract modifiers are not allowed on line 1
  14. -----
  15. <?php class A { static static $a; }
  16. -----
  17. Multiple static modifiers are not allowed on line 1
  18. -----
  19. <?php class A { final final a() {} }
  20. -----
  21. Multiple final modifiers are not allowed on line 1
  22. -----
  23. <?php class A { abstract final a(); }
  24. -----
  25. Cannot use the final modifier on an abstract class member on line 1
  26. -----
  27. <?php abstract final class A { }
  28. // Type in the partial parse could conceivably be any of 0, 16 or 32
  29. -----
  30. Syntax error, unexpected T_FINAL, expecting T_CLASS from 1:16 to 1:20
  31. array(
  32. 0: Stmt_Class(
  33. type: 32
  34. name: A
  35. extends: null
  36. implements: array(
  37. )
  38. stmts: array(
  39. )
  40. )
  41. )
  42. -----
  43. <?php class A { abstract $a; }
  44. -----
  45. Properties cannot be declared abstract on line 1
  46. -----
  47. <?php class A { final $a; }
  48. -----
  49. Properties cannot be declared final on line 1