PHP 8.0: Voting on adding attributes to the kernel

Introduction: PHP 8.0 is scheduled to be released at the end of 2020. In the PHP internal team, the PHP properties in the kernel are being discussed, and the team is also preparing to put it out for users to vote for.

image


Within the PHP team, extensive coordination is underway to add & integrate the functions of the core attributes into PHP 8.0.


The RFC proposes:


Attributes, as a form of structured syntax metadata, are used to declare classes, attributes, functions, methods, parameters, and constants.


Voting for the PHP 8.0 core


Attributes can be used to define configuration instructions directly embedded in the code declaration.


Similar concepts exist in other languages. For example, it is called Annotations in Java, attributes in C++, C# and Python, and Rust and Hack are called Decorators.


So far, PHP only provides comment documents for the unstructured form of metadata, and documentation comments can only be strings.


In order to maintain some structured information, different PHP sub-communities invented pseudo-language based on the @ symbol.


Recognition of attribute suggestions in PHP


The PHP development team voted on the feature of adding attributes in the community, the title is: "Does PHP attribute v2 be accepted in the kernel?" The date ends on May 4, 2020.


So far, the proposal to increase PHP attributes has been voted in favor of the majority.


If you also want to add your own opinions, you can go to the PHP Wiki address to vote.


image


Guess you like

Origin blog.51cto.com/15127566/2665138
Recommended