Jump to content

Recommended Posts

What are some of the advantages and disadvantages of using PHP over JavaScript? Do you have a preference? Do you find it is easier or harder to understand than PHP?

 

The two are hardly comparable as they're generally (with the exception of Node.js) used for two entirely different things and are executed in two entirely different environments.

js and php are just as comparable:

 

- Both are scripting languages; Both are modes of transportation

- One works with the file system one doesn't; One poops one doesn't

- One requires a server one doesn't; One is fast one is slow

- One can do ajax one can't; One needs an oil change one doesn't

- One same code works in all browsers other doesn't; One has built in satellite radio one doesn't

- Both are fun to program; Both die

- Both have similar functionality (Math, Strings, Classes); Both need food to keep it moving

- One runs in the browser one doesn't; One has hooves one doesn't

- One is as fast as the browser it is run in one is as fast as the server it is run on; One needs to be brushed one doesn't

 

 

See lots of similarities, and differences.

js and php are just as comparable:

 

- Both are scripting languages; Both are modes of transportation

- One works with the file system one doesn't; One poops one doesn't

- One requires a server one doesn't; One is fast one is slow

- One can do ajax one can't; One needs an oil change one doesn't

- One same code works in all browsers other doesn't; One has built in satellite radio one doesn't

- Both are fun to program; Both die

- Both have similar functionality (Math, Strings, Classes); Both need food to keep it moving

- One runs in the browser one doesn't; One has hooves one doesn't

- One is as fast as the browser it is run in one is as fast as the server it is run on; One needs to be brushed one doesn't

 

 

See lots of similarities, and differences.

 

Worst. Comeback. Ever.

My point was that they both ultimately achieve the same thing

 

Whoa whoa whoa, hold on a second...a car does not fertilize the road like my amazing horse does, that is not the same thing at all....but wait a second!!! I got it, a Car does fertilize the road, because it can have an oil leak, so really my horse only fertilizes the dirt roads.

 

Interesting!

@ajg, I think you're a bit confused.  JS has a few server side capabilities but that's not what it's primarily used for.  I would suggest reading up on the differences first, try googling "php vs javascript" or "server side vs client side".

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.   Restore formatting

  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.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.