| --- |
| layout: post |
| title: PHP 7.4 Support |
| date: '2019-07-25T14:42:31+00:00' |
| categories: netbeans |
| --- |
| <p>
|
| Hi all. Today, we will briefly show you about PHP7.4 support which will be available in the <b>next NetBeans version</b> i.e. <b>NetBeans 11.2</b>.
|
| </p>
|
| <p>
|
| 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 <a href="https://builds.apache.org/view/M-R/view/NetBeans/job/netbeans-linux/lastSuccessfulBuild/artifact/nbbuild/">here</a>.
|
|
|
| Then, we could merge new changes quickly thanks to our committer <b>Tomas Mysik</b>. Thanks a lot for your review, Tomas!
|
| </p>
|
| <h3>PHP 7.4 Support</h3>
|
| <p>
|
| 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.)
|
| </p>
|
| <img src="https://cwiki.apache.org/confluence/download/attachments/120737486/nb112-php74-project-properties.png"/>
|
| <p>
|
| NetBeans provides support for the new syntaxes for PHP 7.4.
|
| </p>
|
|
|
| <h4>Null Coalescing Assignment Operator</h4>
|
| <img src="https://cwiki.apache.org/confluence/download/attachments/120737486/nb112-php74-null-coalescing-assignment-operator.png" alt="php74-null-coalescing-assignment-operator"/>
|
| <h4>Spread Operator in Array Expression</h4>
|
| <img src="https://cwiki.apache.org/confluence/download/attachments/120737486/nb112-php74-spread-operator-in-array-expression.png" alt="php74-spread-operator-in-array-expression"/>
|
| <h4>Numeric Literal Separator</h4>
|
| <img src="https://cwiki.apache.org/confluence/download/attachments/120737486/nb112-php74-numeric-literal-separator.png" alt="php74-numeric-literal-separator"/>
|
| <h4>Typed Properties 2.0</h4>
|
| <img src="https://cwiki.apache.org/confluence/download/attachments/120737486/nb112-php74-typed-properties-2.0.png"/>
|
| <h4>Arrow Functions 2.0</h4>
|
| <img src="https://cwiki.apache.org/confluence/download/attachments/120737486/nb112-php74-arrow-functions-2.0.png" alt="php74-arrow-functions-2.0"/>
|
|
|
| <h3>New Hints</h3>
|
| <h4>Suggestion for converting a simple closure to an arrow function</h4>
|
| <img src="https://cwiki.apache.org/confluence/download/attachments/120737486/nb112-php74-convert-closure-to-arrow-function.gif" alt="php7.4-convert-closure-to-arrow-function"/>
|
| <h4>Suggestion for using combined assignment operators</h4>
|
| <img src="https://cwiki.apache.org/confluence/download/attachments/120737486/nb112-php74-suggest-using-combined-assignment-operators.gif" alt="php74-suggest-using-combined-assignment-operators"/>
|
| <p>
|
| Of course, code completion, formatting, go to declaration, and mark occurrence features for the above syntaxes should also be fixed.
|
| </p>
|
| <p>
|
| That's all for today. As always, please test it. You can download a development version from
|
| <a href="https://builds.apache.org/view/M-R/view/NetBeans/job/netbeans-linux/lastSuccessfulBuild/artifact/nbbuild/">Jenkins Build</a>.
|
| If you find some issues or enhancements, please report them to <a href="https://issues.apache.org/jira/projects/NETBEANS/issues">JIRA</a> with your exact steps to reproduce them.
|
| <i>(Components: php - Editor)</i>. Thanks.
|
| </p> |