Why don't you list what you think are the advantages with using classes? Most people do not see any advantages, especially for relatively small web sites.
TopDogger
Junior Poster in Training
87 posts since Aug 2005
Reputation Points: 15
Solved Threads: 5
Specifically for this forum most PHP users here are new to PHP development and thus will be unable to do advanced techniques like OOP.
stymiee
He's No Good To Me Dead
3,360 posts since May 2006
Reputation Points: 161
Solved Threads: 38
As a newbie to PHP programming, I think that it is better that the examples here are not shown in a class format. I feel that if someone who is genuinely interested in understanding PHP like myself, would be able to use the working code and make a class out of it themselves. Yeah, examples implementing classes would make it more useful, but then there would be a lot more copy and pasting and not so much learning. I use this site to get some minor details or ideas that aren't easy to find in search engines or on the php documentation. Of course, when someone needs help understanding how classes work and the concepts, examples using classes should be there. Most users that are new to PHP don't focus on reusability anyway. When I started I just wanted it to work. Now I use classes to make things work in various scenarios. It has been a great learning experience like that. I think that stymiee is right about newbies to PHP and OOP, unless they have OOP experience with other languages which they could apply to PHP and so working examples should be enough for them to implement their own classes. I pack all the classes in one external file and so each page that I make just loads that and everything else on that page looks mysterious but practical at the same time.
world_weapon
Junior Poster in Training
63 posts since Apr 2004
Reputation Points: 21
Solved Threads: 2