Netbeans 8.2 will support PHP7 more exciting, netbeansphp7
First, set the PHP version of the PHP project to PHP 7.0.
One of the new features of PHP 7 is the return type declaration. That is, PHP functions and methods can declare the returned values of the specified type:
Another wonderful improvement of PHP 7 is the parameter scalar type declaration, which is supported by the automatic completion function of Netbeans code.
NetBeans also supports new operators in PHP 7:
Group use statement:
Constants can also be grouped into use:
Another major feature of PHP 7-Anonymous class:
8.2 currently from the release date is still a long time, can't wait to taste,: http://bits.netbeans.org/download/trunk/nightly/latest/
Note:
Generator
(PHP 5> = 5.5.0, PHP 7)
The generator provides an easier way to implement simple object iteration. Compared with defining classes that implement the Iterator interface, the performance overhead and complexity are greatly reduced.
The generator allows you to write code in the foreach code block to iterate a group of data without creating an array in the memory. This will limit your memory or occupy a considerable processing time. On the contrary, you can write a generator function, just like a normal custom function. Different from a normal function, a generator can return multiple times as needed, to generate the value to be iterated.
A simple example is to use a generator to re-implement the range () function. The standard range () function generates an array in the memory that contains each value in its range, and then returns the array. The result is multiple large arrays. For example, calling range (0, 1000000) will cause memory usage to exceed 100 MB.
As an alternative, we can implement an xrange () generator. We only need enough memory to create an Iterator object and track the current state of the generator internally, this requires less than 1 kb of memory.
Source: http://www.cnblogs.com/x3d/
The above is all the content in this article. I hope it will be helpful for everyone's learning. For more exciting content, please pay attention to the help house.