Set PHP version in Netbeans 7 for non-project files
Asked Answered
P

3

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.

Papist answered 23/6, 2011 at 16:43 Comment(2)
@Neal next time you have a bug in your code, just ignore it, this will be easier than fix itHooked
@Neal I'll probably disable the inspection until I find a solution. Still, not ideal when your IDE is telling you stuff is broken that isn't.Papist
C
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.

Currycomb answered 10/10, 2011 at 15:26 Comment(0)
S
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

Stratification answered 17/9, 2012 at 5:40 Comment(1)
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.Papist
A
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

Aureole answered 19/6, 2017 at 10:43 Comment(0)
C
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.

Currycomb answered 10/10, 2011 at 15:26 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.