Login | Register   
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

The Object-Oriented Evolution of PHP

One of the key ingredients in the upcoming version 5 of PHP will be the Zend Engine 2.0, with support for a brand new object-oriented programming model. This article describes the evolution of the object-oriented programming support in PHP, covering the new features and changes that are scheduled for PHP 5.


advertisement
ew people know this, but when PHP as we know it today was being molded, back in the summer of 1997, there were no plans for it to have any object-oriented capabilities. Andi Gutmans and I were working to create a powerful, robust and efficient Web language loosely based on the PHP/FI 2.0 and C syntax. As a matter of fact, we got pretty far without having any notion of classes or objects—it was to be a purely structured language. However, on August 27th of that year, PHP's object capabilities changed. When classes were introduced to the code base of what was to become PHP 3.0, they were added as syntactic sugar for accessing collections. PHP already had the notion of associative array collections, and the new classes were nothing but a neat new way of accessing them. However, as time has proven, this new syntax proved to have a much more far-reaching effect on PHP than was originally intended.

Another thing that most people don't know is that by the time PHP 3.0 was officially released in mid 1998, it was gaining momentum at a staggering rate (see Figure 1); Andi Gutmans and I were already determined to rewrite the language implementation. We were well aware that users liked PHP as it existed at the time. But as the authors of the engine we knew what was going on under the hood and we couldn't live peacefully with that. The rewrite, which was later dubbed the 'Zend Engine' (Zend being a combination of Zeev and Andi), initiated and became one of the core components of the second revolution that PHP experienced in just over a year.

Figure 1: PHP Usage as of October, 2002
This revolution, however, left PHP's object model mostly unchanged from version 3—it was still very simple. Objects were still very much syntactic sugar for associative arrays, and didn't offer users too many additional features.



Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap