467,915 Members | 1,877 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,915 developers. It's quick & easy.

Reasons to Learn PHP?

Hi everyone,

I'm relatively new to web development. I know JavaScript and work primarily with JavaScript frameworks - Vue, Angular, Node/Express, and so forth.

I'm wondering if it would be worth it to learn PHP and at least one PHP framework like Laravel. Is there any advantage to using PHP? Any major differences in capabilities between PHP and JavaScript?

I'm just wondering because I know many freelancers do a lot of their work with sites like WordPress, Shopify, etc., and that these run on PHP. At the same time, I've had coworkers mention that PHP is slowly on its way out.

So my question is - are there still good reasons to learn PHP?
Dec 15 '20 #1
  • viewed: 1648
Share:
2 Replies
Expert 256MB
Is there any advantage to using PHP? Any major differences in capabilities between PHP and JavaScript?
So my question is - are there still good reasons to learn PHP?
In my opinion, this would depend on the application and the situation itself. More like a 'vs battle' to make a selection. PHP is simple and is supported by many hosting services. One has to know PHP to be able to work with the things powered by PHP such as WordPress and Drupal. It can be considered a good choice for content-driven websites. On the other hand, the js runtime node is asynchronous and much faster than PHP; hence more viable. But it may require a VPS with ssh access which could add up to the hosting costs.
Dec 15 '20 #2
16bit
At the same time, I've had coworkers mention that PHP is slowly on its way out.
Simply put, NO, its not. PHP is like half the internet, with several BIG websites being run on PHP. (Facebook and Wikipedia are notable examples.)The major alternative to php is ASP (which is proprietary being the reason it hasn't really taken off). Things like GO, Perl, C#, Ruby, C++, etc. are much tougher to learn and tend to have much more difficult syntax, and therefore can be problematic to learn well enough for the average programmer to be able to deploy it efficiently. Also, some of these have inherent security issues. (For example C-derived languages tend to produce more security issues than what it's worth at times.)

Any major differences in capabilities between PHP and JavaScript?
The major disadvantage to JavaScript is that the client can read all of your code (because while you can obfuscate JavaScript, its not a complete solution, and you can't use things like .htaccess to hide the code as includes), and can even "block" your code from executing- because JavaScript is client-side not server-side. Also JavaScript is particularly prone to being used maliciously, as was seen in operation Torpedo, for example.
3 Days Ago #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

17 posts views Thread by Rob | last post: by
7 posts views Thread by python | last post: by
8 posts views Thread by Hermawih | last post: by
15 posts views Thread by Charles | last post: by
5 posts views Thread by Anonieko | last post: by
34 posts views Thread by pandit | last post: by
16 posts views Thread by Raxit | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.