Home >Backend Development >PHP Tutorial >PHP finally has its own formal language specification_PHP Tutorial
As a scripting language, PHP has always played a key role in the field of web development. Now it has begun to make efforts to reduce differences in semantics and syntax.
Although the PHP scripting language has been around as early as 1995 and occupies an important position in the field of web development, it has never had its own formal language specification-it only provides extensive user documentation. But this adverse situation is turning around.
Led by Facebook, a draft specification has been published on GitHub, aiming to come up with a complete definition of the semantics and syntax of the PHP language.
“The next major version of PHP – PHP 7 – is currently being developed to ensure that it fully works with existing PHP scripts and, most importantly, to understand all expectations regarding the use of this engine,” Facebook Sara Golemon, who is responsible for the development of this specification, said. "In addition, due to the introduction of alternative implementations such as HHVM, keeping various divergences to a minimum is also a key consideration, and this also requires us to have a deep understanding of the characteristics of a well-functioning engine."
The PHP team formed this time includes Rasmus Lerdorf, the creator of the PHP language, and Andi Gutmans, CEO of tool supplier Zend Technologies, who is responsible for overseeing specification research and development. Making changes to this specification requires participants to have a php.net account.
The HHVM project, officially known as HipHop Virtual Machine, was built by Facebook and aims to make PHP code run faster. This planned set of specifications will ensure that HHVM becomes an implementation that fully matches PHP, Golemon explained. "For example, the conformance suite we published in the specification can show the number of failures that HHVM has in edge cases. With this kind of information, we can make HHVM more closely integrated with PHP."
The next steps in specification development are to improve expression, fix edge cases, and strengthen the conformance suite. "In the long term, this document will take the same development steps as the PHP implementation to formally document new syntaxes such as the pow operator, variadics, and splat that have recently emerged," Golemon noted.
Developers using this language are constantly working to improve the performance of their applications in real-world environments. In the lab, these changes have reduced the number of device instructions required for application execution, thereby reducing memory usage.
Portal (GitHub):
https://github.com/php/php-langs ... c/php-spec-draft.md