blob: ec6f1ec0accf2c1138288f32cd5892e1987dc531 [file]
---
layout: post
status: PUBLISHED
published: true
title: PHP 7.4 Support
id: b565db52-260d-4eb5-b5fb-189ad41e3e3f
date: '2019-07-25 14:42:31 -0400'
categories: netbeans
tags:
- php
permalink: netbeans/entry/php-7-4-support
---
<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.<br />
Definitely, we need your help!</p>
<p> 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>.</p>
<p> 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>
<p><img src="https://cwiki.apache.org/confluence/download/attachments/120737486/nb112-php74-project-properties.png"/></p>
<p>
NetBeans provides support for the new syntaxes for PHP 7.4.</p>
<h4>Null Coalescing Assignment Operator</h4>
<p><img src="https://cwiki.apache.org/confluence/download/attachments/120737486/nb112-php74-null-coalescing-assignment-operator.png" alt="php74-null-coalescing-assignment-operator"/></p>
<h4>Spread Operator in Array Expression</h4>
<p><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"/></p>
<h4>Numeric Literal Separator</h4>
<p><img src="https://cwiki.apache.org/confluence/download/attachments/120737486/nb112-php74-numeric-literal-separator.png" alt="php74-numeric-literal-separator"/></p>
<h4>Typed Properties 2.0</h4>
<p><img src="https://cwiki.apache.org/confluence/download/attachments/120737486/nb112-php74-typed-properties-2.0.png"/></p>
<h4>Arrow Functions 2.0</h4>
<p><img src="https://cwiki.apache.org/confluence/download/attachments/120737486/nb112-php74-arrow-functions-2.0.png" alt="php74-arrow-functions-2.0"/></p>
<h3>New Hints</h3>
<h4>Suggestion for converting a simple closure to an arrow function</h4>
<p><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"/></p>
<h4>Suggestion for using combined assignment operators</h4>
<p><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>
<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<br />
<a href="https://builds.apache.org/view/M-R/view/NetBeans/job/netbeans-linux/lastSuccessfulBuild/artifact/nbbuild/">Jenkins Build</a>.<br />
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.<br />
<i>(Components: php - Editor)</i>. Thanks.</p>