8

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.

iftheshoefritz
  • 5,829
  • 2
  • 34
  • 41

3 Answers3

16

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

user1491819
  • 1,790
  • 15
  • 20
  • Is this something you can do when you are not working with a project? Intuitively I imagine not but I do not work with Netbeans anymore and not going to install just to check this. – iftheshoefritz Sep 17 '12 at 13:20
4

Go to File Menu of net beans and select project properties of the project and change the version of php from # PHP Version : PHP 5.6 or another. This Error Showing for PHP version(language feature not compatible with php version indicated in project settings)

This Error Showing for PHP version(language feature not compatible with php version indicated in project settings) enter image description here

enter image description here

enter image description here

ranojan
  • 819
  • 8
  • 11
3

I recently did an update to my NetBeans (v7.0.1). I just tried creating a lambda fn and the IDE didn't show any warnings/errors. Try updating your NB.

Timothy Perez
  • 20,154
  • 8
  • 51
  • 39