Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

php-editors.com:
Writing Classes in PHP
Jul 13, 2004 @ 12:04:29

If you've outgrown the simple PHP (procedural programming) and want to get more into the meat of things, classes just might be the way to go. Object-oriented code can help you with speed, code reuse, and even make your code more well structured. So, with all of these advantages, what are you waiting for to learn this information? Why, the right resource, of course. php-editors.com has their own new tutorial posted to aid you in your quest.

Some consider classes one of the hardest components of PHP to figure out, but the reality is that classes are extremely straightforward and easy to use. The trouble comes from the fact that not all programmers have worked with Object-Oriented Programming (OOP) before.

He gives a very basic example of how to get started with classes, their structure, and how to create functions (methods) inside them. Finally, he wraps it up with a sample class and a "how to" on using it.

tagged:

Link:


Trending Topics: