views:

66

answers:

3

Hello

I'm pretty good with PHP, but the one thing I've never understood completely is classes. I've used a few (such as class.upload.php) but have fumbled my way around and more out of a monkey see monkey do approach.

Can anyone point me to some good tutorials that explain how these suckers work and how they function? I'd really appreciate it!

Thanks in advance

+4  A: 

Nettuts: Object-Oriented PHP for beginners

That's a good startting point. They have a lot of these tutorials actually. Also a good idea is, to just go to your bookstore, and see what's lying around there.

I still prefer actual paper to screen reading. Also makes it easier to annotate.

The rest will come with time. After you understand the basics, it would be a good time to further read into OOP design patterns. Start with the singleton, as I feel like that is the easiest to grasp.

http://www.informit.com/articles/article.aspx?p=346958&seqNum=4
http://net.tutsplus.com/articles/general/a-beginners-guide-to-design-patterns/

tilman
excellent. will have a look through these Thanks! :)
Aninemity
+1  A: 

Tutorials won't help you. I'm exactly where you are, but found out that tuts really don't tell you the why and what of things. Only the How.

I really recommend you buy a book. Prentice Hall PHP Power Programming is one excellent book.

Aditya Menon
I did originally learn php from a couple of books, but they were basic and skipped classes altogether. Unfortunately, I live in the middle of nowhere and so my nearest decent bookstore is a couple of hours away. I've never been one for ordering a programming book without having a proper thumb through. will look up PHP Power Programming though - thanks for the recommendation! :)
Aninemity
@Aninemity: On the topic of books, check out O'Reilly's PHP Cookbook. It's amazing and has quite a few examples. http://oreilly.com/catalog/9780596101015
Geekster
excellent. will do. Thanks! :)
Aninemity
+1  A: 

www.php.net has awesome resources for these types of things: http://php.net/manual/en/language.oop5.php

drpcken
aha! I use php.net all the time as a reference, but have never found anything decent on classes. Cheers!
Aninemity