-6

I want to create a class in my Laravel 5 project called 'Class'. When I create this class just like any other I get an error (which is pretty logic because we also have the class operator in PHP).

For those interested in the pretty self-explanatory error exception I get: [Symfony\Component\Debug\Exception\FatalErrorException] syntax error, unexpected 'Class' (T_CLASS), expecting identifier (T_STRING)

Ok I get why this error pops up, but I'm wondering if there is a way to call a class 'Class' because in my project I'm working with different School Classes.

Daniel Gelling
  • 892
  • 1
  • 9
  • 22

1 Answers1

3

No one way to define class with name from list of reserved words. http://php.net/manual/en/reserved.keywords.php

Denis
  • 66
  • 3