JayD3e
JayD3e

Reputation: 2217

Why is Eclipse PHP not recognizing namespace declarations?

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?

Upvotes: 9

Views: 7147

Answers (1)

netcoder
netcoder

Reputation: 67735

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.

Upvotes: 12

Related Questions