Set PHP version in Netbeans 7 for non-project files

iftheshoefritz picture iftheshoefritz · Jun 23, 2011 · Viewed 8.6k times · Source

I'm editing a PHP file in Netbeans that is not part of a project. Although I have PHP 5.3 installed, Netbeans complains about my use of a lambda function: "Language feature not compatible with PHP version indicated in project settings".

Is there a way to tell Netbeans to think in 5.3 when I don't have project settings to edit?

I'm using Netbeans 7.0 with PHP 5.3.3 on Ubuntu.

UPDATE: The code is working, it's just the inspection that is borken.

Answer

user1491819 picture user1491819 · Sep 17, 2012

Right click your project in the Projects tab, click Properties, then on the Sources tab, set the PHP Version. I'm using Netbeans 7.1.2