NameSilo

What Is Harder, JavaScript Or PHP?

Spaceship Spaceship
Watch
Impact
0
Hey all,

Maybe seems like an odd question to ask but the reason I ask is because I am learning JavaScript which I find fairly hard to pick up and I am going to start learning PHP soon and so I wondered if I am going to find it easier or harder than JavaScript?
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
Unstoppable DomainsUnstoppable Domains
I wouldn't say 1 is harder than the other. PHP support and documentation in my opinion is a lot better than that of javascript.

Once you know 1 language however picking up another is a lot simpler.
 
0
•••
I found PHP increcibly easy and I picked up the basics in an hour. Javascript, I've never been able to get the hang of - so I'll say Javascript is harder.
 
0
•••
Mikor said:
I found PHP increcibly easy and I picked up the basics in an hour. Javascript, I've never been able to get the hang of - so I'll say Javascript is harder.

I similarly agree. For JavaScript I always need to look back at references to get the right code but have no issues with PHP. Which IMO, is much better and more useful but sometimes you need to resort to JavaScript. *cough*AJAX*cough*

-RageD
 
0
•••
I agree, PHP is a lot easier than Javascript.

But also, it's a lot easier to make a big security mistake in PHP than in Javascript :)
 
0
•••
I think JavaScript is harder than PHP because it doesn't have "all-in-one" documentation. PHP's entire documentation is in php.net
 
0
•••
I'm going to have to agree with everyone here, php is a lot easier than javascript. I find myself doing a lot of googling when working with javascript but with php it is usually a one stop solution at php.net
 
0
•••
You might want to consider doing php first, and then moving into javascript. i am suggesting this from a functional side, as once you can get your website doing things you want (ie dynamic news) you can start to find usethings to use javascript for (i have always found it easier to learn when you have a purpose).

Also you might want to consider using one of the javascript libraries like mootools, it makes life alot easier with javascript, and is pretty much cross browser compatible.
 
0
•••
php is much easier, yes the documentation is glorious and makes it VERY easy to learn. You don't have to dig all over the net to find an answer. Its almost much easier to debug than javascript.

Javascript you can do all kinds of weird stuff making it hard to understand whats going on. It also seems that stuff isn't very intuitive as it is with php. Or perhaps its just that when coding javascript its much easier to run into problems than php.
 
0
•••
Have to agree with the rest. PHP has a good documentation and is parsed on the server side so you have total control of the results. With javascript there's a good reason why alot of people use code libraries for some very core functions of their scripts. Even if you have a good working solution in one browser, you really have to test it in all important browsers to be sure.
 
0
•••
I agree with everyone here. But also, PHP is more useful. Sure JS can look nice but PHP is the backbone!
 
0
•••
Yeah I'm sticking to my initial but just some more input. Learn PHP first. Build your site using PHP. It is much better for the framework and functionality of your sites. However, JavaScript is very nice for those add-on features so don't neglect it!

-RageD
 
0
•••
Learn HTML first, and CSS, and only then learn PHP. Unless you know html, there is no point to move to php. Trust me on that one, you will be banging your head to the wall next to your PC with out proper knowledge of html and css.
JavaScript != PHP. 2 different languages. You can code a website with php. But you can't do that with JavaScript. JavaScript is a supportive language that helps you create fancy/shmancy links/buttons/ and stuff like that.
 
0
•••
Focus on PHP and only use JavaScript to complement it. You will find plenty of examples on the web and build nice JavaScript scripts from them but always keep your JavaScript as simple as you posibly can since JavaScript is browser dependent.

Learning a language means in my opinion understanding how variables are processed, how to write functions and classes. You will never memorise all the predefined functions since it's impossible and also stupid. So PHP wins from this point of view with an easy to use documentation (like already mentioned).

Also there is no point concentrating on JavaScript over PHP. JavaScript can easely be turned off, injected etc etc. DHTML (dynamic HTML) is nice to use but as long as you code the JavaScript for all browser platforms.

All in all it's hard to compare the two from the utility point of view. However you will find the languages structured in a similar way. Function look the same, they even have similar predefined functions since well, any language tries to cover day-to-day requirements programmers will encounter.
 
0
•••
They have different purposes, PHP for the back-end, and Javascript for the front-end. On-screen effects (fade-ins, graphics effects, etc.) are the forte of JS while PHP does the heavy-lifting in the back end.

It isn't so much as one being harder than the other, as much as Javascript just having so many options to think of (click event, etc.) that you'll have to consider many different things and reacitons to events that it will feel intimidating at first, unlike PHP that is more straightforward in the beginning even if both are more or less similar in the level of work it needs to master.

Personally I'd liken PHP to learning the guiter-- it's relatively easy to learn but takes a lot of work to master; while Javascript is like the piano-- it takes a lot of work to master but in the begining there are just too many keys to consider that it feels more intimidating and thus people feel like it's harder to learn in the beginning.
 
0
•••
i agree with nicholas...javascript and php are not supposed to be compared....!!
 
0
•••
There aren't too many syntax that's same in PHP and Javascript. Almost everything is different. It depends on what languages you have in your backpack, if you've learned C it will be very easy for you to learn PHP.
 
0
•••
for me, php is extremely useful and easier than javascript. i like to server side of php more anyway. but sometimes you need to use one or another, each one has its own advantages.
 
0
•••
I am going with javascript , yet javascript is the most rewarding lol
 
0
•••
Dynadot โ€” .com Registration $8.99Dynadot โ€” .com Registration $8.99
Unstoppable Domains
Domain Recover
DomainEasy โ€” Zero Commission
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back