Commit Graph

3 Commits

Author SHA1 Message Date
Kalle Sommer Nielsen
67b907f059 Change the error message for colliding class/interface/trait names to be a little more clearer.
C:\> php -r "interface stdClass { }"
  Error: Cannot declare interface stdClass, because the name is already in use in Command Line Code on line 1
2015-03-26 01:44:23 +01:00
Kalle Sommer Nielsen
927d53fda4 Change "Cannot redeclare class X" into "Cannot redeclare class/interface/trait X", meaning that the following:
C:\> php -r "trait A { } trait A { }"

Will now properly print "Cannot redeclare trait A" instead of "Cannot redeclare class A" to make error messages a tiny bit clearer. Admittedly, a better solution can most likely be made by actually telling what the colliding object is a type of.

Internally this adds a new function:
 zend_get_object_type()
2015-03-25 06:31:11 +01:00
Felipe Pena
c065d7e7e7 - New tests 2008-05-12 13:30:50 +00:00