Jump to content

PHP vs JavaScript? Noob wanting to learn programming.

Hi guys, after a long postponing I finally decided to take up on programming as my main goal in life. After a year of studying English Philology and two years of switching meaningless jobs a friend of mine showed me a course that he recently passed and he's currently employed in a softdev company. Now I have in front of me the decision on which prog language to start the course in. I've narrowed it down to PHP versus JavaScript and I'd like to know some opinions, especially about noob-friendliness and long-term usefulness. The course starts at absolute 0 with no programming knowledge required, just some basic computer skills. The preliminary exams consist of two logical reasoning tests at which I excel and I think won't be a problem. Nonetheless I'm currently learning html, css, php and javascript through CodeCademy so I'd have a better chance of being selected for the courses. But I still can't decide which one to choose and my friend tells me both are good and prosperous. Please help me with my choice. Thank you! :)

Link to post
Share on other sites

They are totally different.

 

PHP is a server-side scripting language, while JS is a client-side scripting language(can be used as server-side as well, but they're not that common).

 

which-programming-language-should-i-lear

i5 4670k @ 4.2GHz (Coolermaster Hyper 212 Evo); ASrock Z87 EXTREME4; 8GB Kingston HyperX Beast DDR3 RAM @ 2133MHz; Asus DirectCU GTX 560; Super Flower Golden King 550 Platinum PSU;1TB Seagate Barracuda;Corsair 200r case. 

Link to post
Share on other sites

Hi guys, after a long postponing I finally decided to take up on programming as my main goal in life. After a year of studying English Philology and two years of switching meaningless jobs a friend of mine showed me a course that he recently passed and he's currently employed in a softdev company. Now I have in front of me the decision on which prog language to start the course in. I've narrowed it down to PHP versus JavaScript and I'd like to know some opinions, especially about noob-friendliness and long-term usefulness. The course starts at absolute 0 with no programming knowledge required, just some basic computer skills. The preliminary exams consist of two logical reasoning tests at which I excel and I think won't be a problem. Nonetheless I'm currently learning html, css, php and javascript through CodeCademy so I'd have a better chance of being selected for the courses. But I still can't decide which one to choose and my friend tells me both are good and prosperous. Please help me with my choice. Thank you! :)

I personally think that no one should start learning with any of these two languages since they are quite advanced/simple. I would suggest to start with something more basic that would allow you to be more comfortable with those "new" languages since you will have a better understanding of how programming, and even computers work. The C language is the better choice IMHO.

Now, to answer your question I'd say PHP since it will allow to build very functional and advanced websites, and many frameworks and CMS's are PHP based. JavaScript is often used in the front-end (even though server-side applications do exist but they are more complex than PHP IMO).

Link to post
Share on other sites

PHP is a server-side scripting language, while JS is a client-side scripting language.

how about Node.js

 

between the two, i would strongly recommend learning javascript doing stuff on the frontend (in your browser), then move to Node.js for the backend, so that by learning one language you can develop a website full-stack.

then maybe comes mongoDB, which is somewhat a javascript-esque database, so that's really full-stack.

 

i learned php first, but when i went into node i fell in love with it

Link to post
Share on other sites

I can tell you as a web developer, you will not get around to learn both languages, when you really only want to choose between php and js i would say PHP, because you can learn "normal" object oriented programming with php too, which is now and in the future importent. My first steps were made with Java (not script), and it was a good start to really be in oop (object oriented programming). 

 

C as IAmAndre wrote is also a good choice, but i would recommend to not stuck on C long, and forward to c++ soon when you know the basics.

 

What I can tell you, just to let you know. To get a good programmer, you will really need MUCH time. Normally the people I meet needed arround 5 - 6 years with daily programming to really can say "Yes I can programming good".

Link to post
Share on other sites

Thank you for the quick responses! First I'd like to say that this course is a very intensive and effective one, it's getting people from barely knowing how to hold a mouse to having a job as junior developers for 4 months. Whichever language you choose is started from scratch and when you're done with the course you are almost immediately employed by a company. The sponsors are two of the biggest software companies in my country and you even have a chance to start with them and the lectors are actual senior developers working for those companies. So I'd like to point out that it's not just a course to start you with programing, but also you'll be making a living with the language you learned there. Ofcourse you'll have A LOT more to learn on your job and as my friend put it, you'll feel useless the first couple of months on your job. I may have mislead you with my first post and I'm sorry but the real question here is which language will get me a better chance of getting a job and keeping it in the future? As far as I know JS can be used both for front-end and back-end and is more versatile and extensive language than PHP (I may be talking bulls right now, sorry). Thank you!

Link to post
Share on other sites

Coming from someone in the industry, PHP is old and will die eventually.

 

Javascript and Node.JS have begun showing how powerful they can be, if you've seen Walmart's website, it all runs on Node.js.

 

Learning javascript will help you build not only server side applications with Node, but also client side web interfaces.

 

Plus I'm pretty sure there are a ton more jobs for Node or front-end javascript developers these days.

Link to post
Share on other sites

I can tell you as a web developer, you will not get around to learn both languages, when you really only want to choose between php and js i would say PHP, because you can learn "normal" object oriented programming with php too, which is now and in the future importent. My first steps were made with Java (not script), and it was a good start to really be in oop (object oriented programming). 

 

C as IAmAndre wrote is also a good choice, but i would recommend to not stuck on C long, and forward to c++ soon when you know the basics.

 

What I can tell you, just to let you know. To get a good programmer, you will really need MUCH time. Normally the people I meet needed arround 5 - 6 years with daily programming to really can say "Yes I can programming good".

 

PHP is an awful language and isn't Object Orientated. It's "object" orientated. It's fake OOP.

 

Additionally, don't tell people web developers don't touch Javascript, etc. Full stack developers touch and know everything. Front, back, databases, infrastructure, etc.

 

OP: Learn something other than PHP. You'll be happier.

--Neil Hanlon

Operations Engineer

Link to post
Share on other sites

Thank you all! Initially I was leaning towards JS as well, but now I'm sure it'll be my choice. One of the reasons is I'm semi-good at photoshop and I really like designing things and JS' front-end capabilities feel just for me. For now that's it, I know any good programmer has to have extensive skills in more than one language but for me that's still in the far future, now I'll focus at learning everything I can about JavaScript. Thanks again!

Link to post
Share on other sites

Thank you all! Initially I was leaning towards JS as well, but now I'm sure it'll be my choice. One of the reasons is I'm semi-good at photoshop and I really like designing things and JS' front-end capabilities feel just for me. For now that's it, I know any good programmer has to have extensive skills in more than one language but for me that's still in the far future, now I'll focus at learning everything I can about JavaScript. Thanks again!

Hey, glad to hear you've made a choice.

 

About having to have 'extreme skills in one language': A lot of programming languages are really similar, especially Object Oriented Programming Languages like Javascript, Java, Objective C, C#, Kinda C++, Python, Ruby, and many others.

 

Once you learn one of them fairly well, it becomes pretty easy to learn the others.

 

Don't get caught up on becoming really good at a specific language though because trends change all the time, and a language and framework that was relevant  today might become obsolete tomorrow.

 

Just learn what you find interesting and go with the flow!

Link to post
Share on other sites

Coming from someone in the industry, PHP is old and will die eventually.

 

Javascript and Node.JS have begun showing how powerful they can be, if you've seen Walmart's website, it all runs on Node.js.

 

Learning javascript will help you build not only server side applications with Node, but also client side web interfaces.

 

Plus I'm pretty sure there are a ton more jobs for Node or front-end javascript developers these days.

 

Only that a language is not the newest, does not mean it is a bad and die'ing language. Look at c and c++ it is much older then the most other langauges and still exists. Also PHP is getting good support and with the upcoming php 7 release it attacks the speed of  hhvm (hiphop engine).

I am be sure that PHP will not die so quickly, look at the yearly "most recommend programming languages" ratings, there are always the same at the top, c, c#, c++, java, php, and javascript is getting also better.

 

PHP is an awful language and isn't Object Orientated. It's "object" orientated. It's fake OOP.

 

Additionally, don't tell people web developers don't touch Javascript, etc. Full stack developers touch and know everything. Front, back, databases, infrastructure, etc.

 

OP: Learn something other than PHP. You'll be happier.

 

PHP Is not awful, yes you are right that it is a like a fke oop, but not really fake.

The good thing is, if you need to test something quickly, you really can write some code really fast, which is not maybe "good" code but to test something its helpful, when you done testing, you can write it the "correct" way.

 

And I didn't said that he should not touch javascript, but for starting developing i recommend php and after that, when he knows basics and is familar with programming, he can look into other langauges too. And I would say, he must touch javascript and other languages to succeed.

A good programming is not good and perfekt at one languages, he is good in learning other things quick, so when you need to write code within a completely different language you have much less learning time.

 

js as a backend you see not very often for now. It will definitily come in the future but you live now and need to work and earn money now. So I stay at the choice. Start with php, go forward to javascript, in freetime learn java (-without script) and learn nodejs and other things you are interested.

 

PHP is a good language to start with, because it does not depend on requirements of coding style like java which requires that everything is an object.

Link to post
Share on other sites

PHP is literally the worst language to start with. I don't even know how you can think that it's a good language for a beginner. All it will teach a beginner is bad practices, patterns, and give them a terrible mindset to go out into the programming world with.

--Neil Hanlon

Operations Engineer

Link to post
Share on other sites

PHP is literally the worst language to start with. I don't even know how you can think that it's a good language for a beginner. All it will teach a beginner is bad practices, patterns, and give them a terrible mindset to go out into the programming world with.

I wouldn't say it's the worst to start with. I mean, what if OP only wants to create web apps? There's no sense learning any other language if thats the case. And I wouldn't recommend learning C's for ASP unless he's making a very complex site for enterprises.

CPU: Intel Core i5 3570K ( raped to 4.4Ghz) | Motherboard: Gigabyte GA-Z77X-UD3H | RAM: Corsair Vengeance 8GB | GPU: ASUS GTX 980 Strix


Case: Fractal Design DefineR3Storage: 256GB Crucial MX100 & 1TB Samsung Whatevs | Display(s): ASUS MG279Q1x Cheap LG Shit


PSU: Corsair HX650 or something | Cooling: Corsair H80i | Keyboard: Ducky Shine 3 | Mouse: Roccat Kone Pure | Sound: SoundBlaster Recon3D PCI-e

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×