homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

php oop

 8:43 pm on Jun 1, 2010 (gmt 0)


On this site I found a lot of cool examples of PHP OOP. Maybe you know where to find complete examples? Guest books, registration forms, blog...

When I look at the full model is much easier to understand OOP PHP. As different classes interacting with each other, exchange data How to use the generic class for sending data to the database




 9:08 pm on Jun 1, 2010 (gmt 0)


You might be better off trying out a PHP framework like Cake, Symphony or Zend.


 2:42 am on Jun 3, 2010 (gmt 0)

The book PHP 5 Objects, Patterns, and Practice by Matt Zandstra was something I found quite useful.


 11:42 am on Jun 3, 2010 (gmt 0)

class One {
function one_func(){
return 'hello';


class Two {
function two_func(){
return 'world';

//to access the functions of the above classes assuming they r on the same page
$one = new One();
$two = new Two();
print $one->one_func().' '.$two->two_func();


 12:06 pm on Jun 3, 2010 (gmt 0)

Hi there Lolalola,

I too am just starting to learn OOP, and am finding it quite alot of fun, especially when it works. For places of reference php.net is the best place as a start point - but we all have our different ways of learning. I started php years ago, and decided to learn OOP when I had got the hang of just writing a script, and honing it to function better so that the background experience would pay off when trying a new way of structuring a site. I'm glad I made that choice.

One thing to be wary of is the differences between the PHP4 and PHP5 class engine/structure, as this has caught me out a few times in the last day or two.

My advice: Start with something simple, learn how things are structured, and see how they interact - see what happens when you change var types etc - this is how I have gone about it.

There are a few decent books out, just depends on how much you are willing to pay.

Have fun with whatever you decide to go with.

Good luck!


Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved