Should I learn C & C++ before learning PHP?

Probably like asking should I learn to drive a car before I learn to ride a bicycle.

A little, but bicycles have been around for longer than cars have, and cars are safer too. I think it’s probably the other way around.

I think there is no need to learn C/C++ if you will be PHP web developer. Instead of diving in C language I would recommend you to spend some time in learning some basic knowledge about web services. It is very useful to know some basic stuff about web servers (Apache and/or maybe IIS if you will go for that platform), something about unix filesystems and something about security.
Sooner or later you will probably use some mod_rewrite stuff and similar programming.

But, like there is no (necessary) need to learn C, there is no (necessary) need to learn all of the above. You can dive into it along the way, whenever you will need it.

Anyway … I wish you all the best entering web programming.

:wink:

No need.
PHP is easier than C++.

For those who want to learn C++:
Learn PHP first and then go for C++ :wink:

Good One. lol :wink:

Learn PHP simply because you have way more fun developing for it. This is because it is easy to make a web app. With C/C++ your basically stuck to console programming when your a beginner. Boring.

I don’t think anyone unless they are an absolute genius can learn C++ (who hasnt had much programming experience) can learn it in 2 months!

Actually, I can’t agree more :slight_smile:

It’s like playing with medicine balls for 10 minutes so that you’ll have no problems playing a 60 minute basketball game.

That’s like going and playing basketball with a tennis ball, and then trying to play a 60 minute game with a basketball. It’s just going to make your life harder.

I jumped straight into the Windows APIs and started making Windows apps first. I only used console apps for learning the language (playing around with stuff basically). I guess it depends what your motivations are for learning – mine was to develop a Windows application for a client. :wink:

I’m learning C++ in school right now, over a year after I started with PHP. I know alot more than everybody else does because of it. It works both ways, is what I’m trying to say.

My advantage when it came to learning C is that I had lots of experience with other languages so it didn’t take me any time at all to learn it. However I’d argue that it’s not unreasonable for even a beginner to learn C in less that 2 months if he is quick-witted.

Well, I can program in C and I assume you can as well, but to say you “know” C in two months is preposterous. There are professors with multiple PHD’s that will tell you they still don’t completely “know” C. Anyway, don’t want to debate with you. My last point is, to tell the person asking these questions that in two months they can be programming data structures built up from blocks of memory allocated from the heap at run-time with pointers is a bit of a stretch. :rolleyes:

I learned C in Uni, and tought myself PHP. They are VERY similar, however PHP is much simpler. If you see no future need to learn C, I would not. Its quite a big undertaking IMHO.

Just dive into PHP.

You’ll only need two languages:

C++ for speed (large 3d games)
Ruby for everything else (websites, GUI-applications, even small 3d games) - it’s much easier than PHP.

So, if you don’t want large 3d games, learn Ruby. After that, you’ll never even think about learning PHP.

You’ll only need two languages:

C++ for speed (large 3d games)
PHP for everything else (websites, GUI-applications, even small 3d games) - it’s much easier than Ruby.

So, if you don’t want large 3d games, learn PHP. After that, you’ll never even think about learning Ruby.

mod_ruby … guffawff :wink:

sorry about the above , too easy :wink:

If you want to lean C/C++ then go for it , but you don’t need it to learn and use PHP.

You dont need to know C to build your server , compile and install the OS, webserver,database and PHP itself , you may need to know how to configure all of the above (remotely)

If you are working in the web-arena then learning basics of networking / network protocols , server-management , DNS configuration etc are far more useful to you in the real world, when you have that cracked learn C.

If after all that you are bored , learn Ruby :slight_smile:

C requires you to know how computer memory is organized, you are probably going to get stuck on pointers and so on. C++, well, it’s a derivative of C with additional features (OOP and so on). I believe it’s also not an option. Start simple, start PHP, start with something that suites you best. ‘Learning’ a language is easy, it takes alot of time to learn how to program in general. As they say, it takes 10 years to become proficient in any field, programming included.

My first language was PHP and I didn’t encounter any major problems aside from the ones every newbie runs into :wink:

I also found that my knowledge in PHP helped me alot when I started to learn C/C++ because of the similarities in syntax. So it works both ways :slight_smile:

good point haxr.

n0other: Thats true, with PHP you dont run into pointers and their … emmm, association with arrays :wink: PHP makes arrays simple.

Sorry, KEEPS arrays simple.

Same take as mmj on this…

learn only the language you need. As you come accross other projects you’ll probably need to learn other languages and the knowledge you’ll already have will help you grasp details and differences. What you want to know altought is some object/procedural programming, data structure and common algorithm. Those will save you a lot of mistakes and you can use them wathever language you’re using (if the language support it).