Prev | Current Page 230 | Next

W. Jason Gilmore

"Beginning PHP and MySQL: From Novice to Professional"

The purpose of this chapter was to bring
you up to speed regarding many of the PHP functions that will make your programming
life much easier as you deal with these arrays.
The next chapter focuses on yet another very important topic: object-oriented
programming. This topic has a particularly special role in PHP 5 because the process
was entirely redesigned for this major release.
163
?–  ?–  ?– 
C H A P T E R 6
Object-Oriented PHP
While for many languages object orientation is simply a matter of course, it took
several years before such features were incorporated into PHP. Yet the early forays
into adding object-oriented features to the language were considered by many to be
a poor attempt at best. Although the very basic premises of object-oriented programming
(OOP) were offered in version 4, several deficiencies existed, including the following:
??? An unorthodox object-referencing methodology
??? No means for setting the scope (public, private, protected, abstract) of fields
and methods
??? No standard convention for naming constructors
??? Absence of object destructors
??? Lack of an object-cloning feature
??? Lack of support for interfaces
Thankfully, version 5 eliminated all of the aforementioned hindrances, offering
substantial improvements over the original implementation, as well as a bevy of new
OOP features. This chapter and the following aim to introduce these new features
and enhanced functionality.


Pages:
218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242