The long-awaited PHP5 was finally officially released on July 13 local time. Whether for PHP language itself or PHP users, the release of PHP5 is considered a milestone version. Before the release of PHP5, various PHP versions won the favor of many developers with their simple syntax, rich library functions and extremely fast script interpretation execution speed, and almost became the preferred WEB development language on the *NIX platform. However, from the perspective of the language itself, the grammar design of PHP, especially the OO aspect, is not perfect, of course, this is related to the original design purpose of the author of the PHP language.
As we all know, PHP was originally just a template system written in Perl, and its subsequent development ideas were also as convenient as possible for the rapid development of WEB programs. A large number of library functions are added, while the development of language models is relatively slow. Although object-oriented design was added to PHP4, its language model is not perfect and lacks basic elements such as constructors, destructors, abstract classes (interfaces), exception handling, etc. This greatly limits the ability to use PHP to complete large-scale applications.
The birth of PHP5 fundamentally changed the above disadvantages of PHP. The adoption of Zend II engine, complete object model, improved grammatical design. Finally, PHP has become a fully designed scripting language with truly object-oriented capabilities. We expect that the emergence of PHP5 will bring a new round of improvements in various library and application development to the entire PHP community.
PHP5.0 version enhances the following features. First, fully implement object-oriented. In PHP4 version, objects with deep copy as the default value are substituted, and in PHP5, they become shallow copy as the default value. Therefore, PHP5 is not fully compatible with PHP4, but it provides a feature called PHP compatibility mode. The second is the XML function. PHP5.0 version supports an XML processing interface called SimpleXML that can intuitively access XML data. At the same time, XML Web service support is strengthened, and the standard supports SOAP extension module.
In terms of database, the new version of PHP provides a new interface designed to access MySQL - MySQLi. In addition to the previous interface, new MySQL functions such as object-oriented interfaces and prepared statements can also be used. In addition, PHP5.0 is also bundled with small capacity RDBMS--SQLite.