Reputation: 1491
I have an entity which should logically be called a "Class" (as in a class in school)
But when using
class Class {
in my code, it obviously throws an error.
because I realize this is a reserved keyword, hence the "obvious"
Is there any way around this besides giving the entity a different name?
Upvotes: 0
Views: 71
Reputation: 5882
You cannot use "class" as class name, this is a reserved word.
http://php.net/manual/en/reserved.keywords.php
Upvotes: 4