Linked by John Collins on Wed 21st Apr 2004 06:42 UTC
The purpose of this article is to give a novice programmer the basic idea of what OOP is, as implemented using PHP. Readers should have a basic knowledge of programming ie what variables are, variable types, basic methods of writing comments, and how to enter code into a text editor.
Permalink for comment
To read all comments associated with this story, please click here.
Yes and no.. PHP4 doesn't has them, but PHP5 has them. You should read the great article about PHP5 at http://www.sitepoint.com/article/coming-soon-webserver-near/ . In the five page, there have about public, private and protected.
Anyway, I usually like to do this:
$statement = "{$this->$Name} rides bus number {$busNumber}";
instead this:
$statement = $this->$Name . " rides bus number " . $busNumber;