Logo

Doing OO in PHP4

For those who are used to develop code using more mature OO language like Eiffel, Java or C++ (there might be some discussions whether C++ is a mature OO language or not...) There are a couple of semantic "gotchas" in developing fully OO code using PHP4.

In the following sections we will give a few examples of where the specific semantics of PHP4 might surprise and lead to hard to track down defects in the code.

Note: With the arrival of PHP5 most of these problems and issues have been addressed. Unfortunately the price is that the new object model in PHP5 requires some quite substantional re-writes of existing PHP4 code to really take advantage of all the new PHP5 features.

 

Content

A discussion of the most common mistakes when doing OO-coding in PHP4
Why using foreach() with OO PHP4 can cause surprises

 

 
Valid (X)HTMLValid CSSDriven by PHPRSS Feed
Text & Images © Aditus Consulting 2000-2009