Page 1 of 2
How did you learn PHP?
Posted: Thu Feb 23, 2006 3:33 pm
by sjeika
Before I buy (any more) books or whatnot, I'm interested in seeing what all of you think is the best and successful way in learning PHP. Learn it from a book? Web site? Live classes? Share them! It's always good to let other people know what they have done to become a PHP programmer. Share the wealth!

Posted: Thu Feb 23, 2006 4:06 pm
by feyd
I read the manual. That's it. End of story. Bye-bye. See you later.
Seriously though, I just read the manual. It took me about three days to go through it all and understand it and php's syntax (for the most part.) But my experience is likely a bit unique.

Posted: Thu Feb 23, 2006 4:38 pm
by Christopher
feyd wrote:I read the manual. That's it. End of story. Bye-bye. See you later.
Seriously though, I just read the manual. It took me about three days to go through it all and understand it and php's syntax (for the most part.) But my experience is likely a bit unique.

I agree. The one thing about the PHP manual is that there are a small set of sections "buried" in the manual that everyone should read. I say "buried" because newbies seem to be unable to find them. I have mentioned before that we should have a page around here (feyd will probably tell me there is one

) that has this "Reading List":
Language Reference
10. Basic syntax
11. Types
12. Variables
13. Constants
14. Expressions
15. Operators
16. Control Structures
17. Functions
18. Classes and Objects (PHP 4)
19. Classes and Objects (PHP 5)
Features
36. Sessions
Function Reference
V. Array Functions
XXXVIII. Filesystem Functions
LXX. Mail Functions
LXXXI. Miscellaneous Functions
CXLIX. String Functions
It probably takes less than an hour to read and click through those sections, but they contain most of what a newbie needs -- with examples.
Posted: Thu Feb 23, 2006 4:40 pm
by nickman013
This thread, and some in the manual (the parts i understood) , online, and a book. This thread probly helped me out the most though.
Posted: Thu Feb 23, 2006 4:42 pm
by Chris Corbyn
nickman013 wrote:This thread, and some in the manual (the parts i understood) , online, and a book. This thread probly helped me out the most though.
This thread?

Not had your weetabix this morning?

I guess you meant "Forum"

Posted: Thu Feb 23, 2006 4:44 pm
by nickman013
haha I actually didnt sleep at all because I had to edit a video overnight for my job, and if I fell asleep i wouldnt have waken up and the video would have been late, and it was a big client.
Posted: Thu Feb 23, 2006 5:37 pm
by josh
d11wtq wrote:This thread?

Not had your weetabix this morning?

I guess you meant "Forum"

You mean these forums / message boards? This forum is the general discussion forum
</offtopic>
It was the manual and online tutorials for me..
Re: How did you learn PHP?
Posted: Thu Feb 23, 2006 5:49 pm
by Roja
sjeika wrote:Before I buy (any more) books or whatnot, I'm interested in seeing what all of you think is the best and successful way in learning PHP. Learn it from a book? Web site? Live classes? Share them! It's always good to let other people know what they have done to become a PHP programmer. Share the wealth!

I was bored at a conference, so I googled for a web game. I found Blacknova Traders (which is written in PHP). I played, and I got annoyed by the bugs. (I had no experience in PHP).
I saw that it was opensource, and that the code was available on sourceforge. I looked at the code, found a bug, and using the php manual, looked up the functions. Within an hour, I had a patch ready, which I submitted. Later that night, the dev team invited me to join.
Four years later, I'm happy to say I enjoy PHP programming immensely. I know quite a bit, but I still have plenty to learn.
I learned by working on something I enjoyed. To me, thats the best way to learn a programming language.
Posted: Thu Feb 23, 2006 6:08 pm
by painperdu
The books don't make sense unless you are somewhat already familiar with the actual working of the code. I think this is why the first excercise in programming is almost always the "hello world" echo statement.
Debugging code is where the real learning takes place becuase it helps you develop a sense of cause and effect between the different elements of the language. It forces you to hypothesize solutions to problems and then test the hypothesis.
Posted: Thu Feb 23, 2006 6:10 pm
by m3mn0n
I only knew HTML, CSS, and basic JavaScript before starting with PHP so because I did not have experience with other programming languages, learning how from a book was the option I picked.
I've said it quite a bit on the forums here, from my experiences with learning PHP and helping others learning, books are the best method.
If you break it down, it's simply a more organized tutorial that covers a wide array of topics so you have a more consistent learning experience and of course, a higher quality learning experience in most cases. That's so, IMO, because things published on the web do not have to meet any quality standards, whereas to get a book deal, you have to know your stuff and other experts verify your teachings to ensure it's quality.
I'd always recommend a book over a tutorial or just the manual, but the other methods work fine too if you do not want to buy a book, or if you've found a very good tutorial.
painperdu wrote:The books don't make sense unless you are somewhat already familiar with the actual working of the code.
Wrong.
Books are made to suit a certain audience, some cater to absolute beginners and some are more suited for advanced learning. When I first started, the books I got always explained basic syntax, and it went through very simple things like that, presuming I had no prior experience with programming. Now the books I buy do not touch on any of that, they get right into the complex topics and presume you are experienced.
Every book I've seen clearly states who the intended audience is, so to say it doesn't make sense if you do not know how to code is wrong, because if you select a book made for an audience of programming newbies, then it will of course make a lot of sense to read it if you're new.
Posted: Thu Feb 23, 2006 6:31 pm
by Roja
Sami wrote:painperdu wrote:The books don't make sense unless you are somewhat already familiar with the actual working of the code.
Wrong.
I don't think he's wrong.
His phrasing isn't ideal, but his concept is: A manual (like a dictionary) is a poor way to learn a language.
I find book learning (for programming languages especially) to be extremely frustrating. For me, I need to dig in, get my hands dirty, make mistakes, learn from the mistakes. The book does only one of those for me.
Thats why I learned based on a project I enjoyed, and why I recommend the same to others. If you have no specific interest that will drive your learning forward, its just a dry book of facts - a dictionary, when you need an encyclopedia.
Posted: Thu Feb 23, 2006 6:40 pm
by m3mn0n
Both aren't ideal IMO.
The book I first learned with wasn't in "english class text book" format where you'd have to read, read, read, read, and then finally get a chance to play around with what you've learned.
I've found from the beginner books that I've seen, a large number have hands on examples you do and play around with every step of the way. So when you first learn about if conditionals, a demonstration snippet is displayed, then explained, and then one is instructed to code that and then make variations and experiment in a trial-and-error type sense.
This sort of learning continues throughout the different topics so to suggest that it's a poor way to learn a language is something I personally strongly disagree with. I'd say it's the best way by far because of the solid fundamentals you are taught, and hands on experience you get (much like in a classroom setting).
Posted: Thu Feb 23, 2006 6:41 pm
by Christopher
I think we are getting down to different types of learners. Some people really benefit from reading a tutorial style book, others need to see code and experiment, and often prefer reference style books to tutorials. There is not one best way, so sjeika needs to have some insight into what kind of learner she/he is.
Re: How did you learn PHP?
Posted: Thu Feb 23, 2006 7:06 pm
by m3mn0n
Well I think this is as much of a discussion about pointing sjeika in the right direction, as it's a discussion/debate about what
we feel is the best way...
sjeika wrote:I'm interested in seeing what all of you think is the best and successful way in learning PHP.
Posted: Thu Feb 23, 2006 7:15 pm
by Roja
Sami wrote:Both aren't ideal IMO.
For you.

Its definitely a personal preference issue.
Sami wrote:I've found from the beginner books that I've seen, a large number have hands on examples you do and play around with every step of the way. So when you first learn about if conditionals, a demonstration snippet is displayed, then explained, and then one is instructed to code that and then make variations and experiment in a trial-and-error type sense.
I've never seen one that has any substantial trial-and-error. Further, the examples require substantial typing in, and aren't usually interesting or compelling. Thats why I enjoy finding a project that seems interesting, and hacking on it.
Sami wrote:This sort of learning continues throughout the different topics so to suggest that it's a poor way to learn a language is something I personally strongly disagree with. I'd say it's the best way by far because of the solid fundamentals you are taught, and hands on experience you get (much like in a classroom setting).
If you get bored, disinterested, or tired of typing in code, you won't get ANY fundamentals.
Its a preference thing Sami. Some people are geared for more hands-on learning, some people are geared for more book learning.
Personally, I own three books on PHP. All three I bought two years *after* I learned PHP. The only resources I used was the project, and the manual. Thats it.