name.test-fail 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. Invalid class name
  2. -----
  3. <?php class self {}
  4. -----
  5. Cannot use "self" as class name as it is reserved on line 1
  6. -----
  7. <?php class parent {}
  8. -----
  9. Cannot use "parent" as class name as it is reserved on line 1
  10. -----
  11. <?php class static {}
  12. -----
  13. Syntax error, unexpected T_STATIC, expecting T_STRING on line 1
  14. -----
  15. <?php class A extends self {}
  16. -----
  17. Cannot use "self" as class name as it is reserved on line 1
  18. -----
  19. <?php class A extends parent {}
  20. -----
  21. Cannot use "parent" as class name as it is reserved on line 1
  22. -----
  23. <?php class A extends static {}
  24. -----
  25. Syntax error, unexpected T_STATIC, expecting T_STRING or T_NAMESPACE or T_NS_SEPARATOR on line 1
  26. -----
  27. <?php class A implements self {}
  28. -----
  29. Cannot use "self" as interface name as it is reserved on line 1
  30. -----
  31. <?php class A implements parent {}
  32. -----
  33. Cannot use "parent" as interface name as it is reserved on line 1
  34. -----
  35. <?php class A implements static {}
  36. -----
  37. Syntax error, unexpected T_STATIC, expecting T_STRING or T_NAMESPACE or T_NS_SEPARATOR on line 1
  38. -----
  39. <?php interface self {}
  40. -----
  41. Cannot use "self" as interface name as it is reserved on line 1
  42. -----
  43. <?php interface parent {}
  44. -----
  45. Cannot use "parent" as interface name as it is reserved on line 1
  46. -----
  47. <?php interface static {}
  48. -----
  49. Syntax error, unexpected T_STATIC, expecting T_STRING on line 1
  50. -----
  51. <?php interface A extends self {}
  52. -----
  53. Cannot use "self" as interface name as it is reserved on line 1
  54. -----
  55. <?php interface A extends parent {}
  56. -----
  57. Cannot use "parent" as interface name as it is reserved on line 1
  58. -----
  59. <?php interface A extends static {}
  60. -----
  61. Syntax error, unexpected T_STATIC, expecting T_STRING or T_NAMESPACE or T_NS_SEPARATOR on line 1