PHP 7.4 Support

Thursday July 25, 2019

Hi all. Today, we will briefly show you about PHP7.4 support which will be available in the next NetBeans version i.e. NetBeans 11.2.

First of all, I strongly hope that new features are tested by PHP users before NetBeans 11.2 is released because there should be bugs. Definitely, we need your help!

If you are interested in them, please test it. You can download a dev version here.

Then, we could merge new changes quickly thanks to our committer Tomas Mysik. Thanks a lot for your review, Tomas!

PHP 7.4 Support

To enable it, you have to set PHP 7.4 as the PHP version of your PHP project. (Right-click your project node, click Project Properties.)

nb112 php74 project properties

NetBeans provides support for the new syntaxes for PHP 7.4.

Null Coalescing Assignment Operator

nb112 php74 null coalescing assignment operator

Spread Operator in Array Expression

nb112 php74 spread operator in array expression

Numeric Literal Separator

nb112 php74 numeric literal separator

Typed Properties 2.0

nb112 php74 typed properties 2.0

Arrow Functions 2.0

nb112 php74 arrow functions 2.0

New Hints

Suggestion for converting a simple closure to an arrow function

nb112 php74 convert closure to arrow function

Suggestion for using combined assignment operators

nb112 php74 suggest using combined assignment operators

Of course, code completion, formatting, go to declaration, and mark occurrence features for the above syntaxes should also be fixed.

That’s all for today. As always, please test it. You can download a development version from Jenkins Build. If you find some issues or enhancements, please report them to JIRA with your exact steps to reproduce them. (Components: php - Editor). Thanks.