Jump to content

Recommended Posts

What are the advantages & disadvantages of PHP & JavaScript? Can anyone demonstrate the situations with code where it is better to make use of PHP and situations where it is better off to apply JavaScript? I'm asking this to best implement both the languages! Thanks in advance to the people who can help me! Thank you!

Link to post
Share on other sites

There is no comparison between php ad js. they are different by nature and you can compare things which are nature wise same, you can compare PHP with ASP, JS with VBscript but you can compare JS and PHP.php is server side language. js is is client side language. once page is requested and served it is out of scope of php. js can work on the served page dynamically like changing the document structure. JS can change anything server side it has scope only in browser (though now NODE.js uses javascript for serer side handling)

Edited by birbal
Link to post
Share on other sites

I suppose you might be able to say that anything that can be done properly with JS should be done with JS and PHP should be used only where necessary. In many cases it is best to use both JS and PHP working together.

Link to post
Share on other sites

Anything that can be done with Javascript should always have a PHP alternative for people who have Javascript disabled. Javascript is unreliable. There's no Javascript vs PHP because they both perform different functions and usually work together.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...