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!
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
<? 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 ).