Why is Eclipse PHP not recognizing namespace declarations?

后端 未结 1 1577
梦如初夏
梦如初夏 2020-12-31 14:23

When I type \"namespace ORM;\" in Eclipse, it underlines ORM in red and says that it is expecting a parenthesis. Is there a way to make Eclipse recognize namespaces?

相关标签:
1条回答
  • 2020-12-31 15:13

    It's probably your project that is set to the 5.1/5.2 version. You can change the default in:

    Window > Preferences > PHP > PHP Interpreter > PHP Version > 5.3

    Alternatively you can go in Project Properties (right-click your project then Properties) then PHP Interpreter, tick Enable project-specific settings and change the PHP Version there.

    0 讨论(0)
提交回复
热议问题