
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 objectsit 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 A
ndi), initiated and became one of the core components of the second revolution that PHP experienced in just over a year.
This revolution, however, left PHP's object model mostly unchanged from version 3it was still very simple. Objects were still very much syntactic sugar for associative arrays, and didn't offer users too many additional features.