Netbeans 8.2 will support PHP7 more exciting, netbeansphp7

Source: Internet
Author: User
Tags netbeans

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.