name.test 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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 from 1:13 to 1:18
  14. array(
  15. )
  16. -----
  17. <?php class A extends self {}
  18. -----
  19. Cannot use 'self' as class name as it is reserved from 1:23 to 1:26
  20. -----
  21. <?php class A extends PARENT {}
  22. -----
  23. Cannot use 'PARENT' as class name as it is reserved from 1:23 to 1:28
  24. -----
  25. <?php class A extends static {}
  26. -----
  27. Syntax error, unexpected T_STATIC, expecting T_STRING or T_NAMESPACE or T_NS_SEPARATOR from 1:23 to 1:28
  28. array(
  29. )
  30. -----
  31. <?php class A implements self {}
  32. -----
  33. Cannot use 'self' as interface name as it is reserved from 1:26 to 1:29
  34. -----
  35. <?php class A implements PARENT {}
  36. -----
  37. Cannot use 'PARENT' as interface name as it is reserved from 1:26 to 1:31
  38. -----
  39. <?php class A implements static {}
  40. -----
  41. Syntax error, unexpected T_STATIC, expecting T_STRING or T_NAMESPACE or T_NS_SEPARATOR from 1:26 to 1:31
  42. array(
  43. )
  44. -----
  45. <?php interface self {}
  46. -----
  47. Cannot use 'self' as class name as it is reserved on line 1
  48. -----
  49. <?php interface PARENT {}
  50. -----
  51. Cannot use 'PARENT' as class name as it is reserved on line 1
  52. -----
  53. <?php interface static {}
  54. -----
  55. Syntax error, unexpected T_STATIC, expecting T_STRING from 1:17 to 1:22
  56. array(
  57. )
  58. -----
  59. <?php interface A extends self {}
  60. -----
  61. Cannot use 'self' as interface name as it is reserved from 1:27 to 1:30
  62. -----
  63. <?php interface A extends PARENT {}
  64. -----
  65. Cannot use 'PARENT' as interface name as it is reserved from 1:27 to 1:32
  66. -----
  67. <?php interface A extends static {}
  68. -----
  69. Syntax error, unexpected T_STATIC, expecting T_STRING or T_NAMESPACE or T_NS_SEPARATOR from 1:27 to 1:32
  70. array(
  71. )