Official releases of PHP syntax specifications and php syntax

Source: Internet
Author: User
Tags hhvm

Official releases of PHP syntax specifications and php syntax

The PHP language has been around for more than 20 years and is clearly one of the most popular programming languages in the world. PHP is definitely a common language for web programming on Internet servers.

Despite extensive user-documentation, PHP always misses language specifications. This does not mean that a specification is not considered or discussed. It's just something that has never been actually implemented.

The Chinese philosopher Lao zi said, "A journey of a thousand miles begins with a single step ". We are excited to announce the first draft of a standardized PHP program.

The existence of the specification declared Sarah in OSCON 2014. The majority of feedback messages and samples are positive.

Now, the draft of the entire specification has been published. Hosted in the php.net git repository, this repo will go to the GitHub image. Read the specifications. Provide your request and feedback. We hope and expect that this specification will change over time to help everyone who cares about the PHP language.

Thank you for the further development and assistance of the PHP Group with a sophisticated and hosted Infrastructure specification. This is a real community-owned and Development Project.

The special thanks must be given to Rex Jaeschke, the actual writing specification of lead, and the cause of Paroski, key in review work and help Rex norm shape into its initial form. Thanks to the great contributions and feedback from Paul Tarjan, Sara Golemon, watz Manfred emnow, Josh and other HHVM teams. Thanks to stanislavarisen and niquetapov for reading the specifications in advance and providing valuable feedback.

Standardized language programming may not be the most important thing in the world, but in my opinion, this is an exciting PHP language.

Original article: http://hhvm.com/blog/5723/announcing-a-specification-for-php

Github hosting address: https://github.com/php/php-langspec/tree/master/spec


Php syntax rules

Php is different from other programming languages!
When there is no other code (html, javascript, css, etc.) after the php code, can the end symbol be omitted?> Of
And most people do this.
This is conducive to program optimization, that is, when the file is contained by other files, avoid unnecessary spaces.
Iandug is a bit extreme
For example:
<? Php echo 123; can the above Code completely omit the terminator?>
The operation is completely unaffected.
<? Php echo 123;?> <Div> Hello </div> in this case, what is the terminator?> Cannot be omitted


Syntax Rules in php

Isn't this problem manual easier?
PHP has a series of magic constants, which are characterized by the beginning and end of a Double underline, among which _ FILE _ is the most commonly used.

_ METHOD _ class METHOD name (New PHP 5.0.0 ). Returns the name (case sensitive) when the method is defined ).

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.