View Full Version : What Is Harder, JavaScript Or PHP?

10-19-2007, 04:37 PM
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?

10-19-2007, 05:15 PM
Well... The simple answer is Both are easy !

Be it PHP, Java, C, JavaScript or Dot.Net The only difference is the syntax and architectures. All you need to be conformable if the logic and analytic skills.

Thanks and Regards,
Rochak Chauhan.


10-19-2007, 05:40 PM
Well, JavaScript is by itself much easier and more consistent than PHP. But then JavaScript by itself cannot do much. JavaScript operates on a web page inside a browser, however, and the browser and webpage add a whole different level of complexity. On top of that, you have multiple browsers working slightly different that should all be able to handle the script, which adds further to the complexity.

PHP on the other hand doesn't have as clean a core as JavaScript. And in PHP very much of the language is bolted on afterwards. The server and database also add complexity to PHP, but normally the code only has to run on one server with one database, not a whole bunch of them.

All in all, I don't think you can say if one is harder than the other, though - PHP is in itself harder if you ask me, but once you figure things out on your server and database you don't have to go change that code much. With JavaScript you on the other hand have to deal with multiple browsers.

Then there's the issue of code size. If you don't have an AJAX-heavy site, then you'll probably be doing more work on the server than in the client. That means even if you find PHP itself easier, you'll have to dive deeper into that language. Or the other way around for AJAX-heavy sites.

10-19-2007, 10:39 PM
Both languages are very similar. The biggest difference is that you can test JavaScript just by installing four web browsers on your computer (IE, Firefox, Opera, Safari) whereas to test PHP you either have to upload to your web hosting or install a web server on your own computer.

The only other significant difference is that PHP can read and write files and databases while JavaScript can't. For just about everything else it is just a matter of slight differences in the syntax you use.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum