Jump to content

The PHP vs Python Circus


JeevanisM
 Share

Recommended Posts

Hi All,

I am seeing so many places and been told several times that Python is going to over take PHP. Is it true ? what you think about this most heated debatable subject ? Any one think switching from PHP to Python / Django is a better option for future ?

Link to comment
Share on other sites

Exactly what BitPoet said.

Over the years I've heard over and over again how PHP is a dead/dying language, and how the future is all about [insert any imaginable language here]. If anything, I've learned not to care: PHP has been around for a long time, and to date it's still a lively project with a massive ecosystem.

When I started with PHP 4 (or 3 — can't remember for sure) back in the days, it was a whole different language, really. 5.x made it a viable object-oriented language, 7.x brought in massive improvements in terms of features and performance, and 8 looks like it's going to be a blast as well. So yeah, I don't see any reason to jump the ship at this point; if anything, I'm pretty sure that PHP will have a lot more to offer in the future ?

  • Like 6
Link to comment
Share on other sites

Python has one big advantage over PHP, which people might or might not care about: It‘s widely used for devops tooling because it‘s preinstalled on so many systems and it‘s growing super fast in the space of ML/AI/Science based computing because of it‘s bindings to fast low level C code while still writing python on top. If you care about those things or you want to do them as well, but not introduce a mix of technology, then sure python is a great solution. If not I don‘t see any reason to switch from whatever one is using right now.

  • Like 7
Link to comment
Share on other sites

On 2/22/2020 at 1:18 PM, LostKobrakai said:

Python has one big advantage over PHP, which people might or might not care about: It‘s widely used for devops tooling because it‘s preinstalled on so many systems and it‘s growing super fast in the space of ML/AI/Science based computing because of it‘s bindings to fast low level C code while still writing python on top. If you care about those things or you want to do them as well, but not introduce a mix of technology, then sure python is a great solution. If not I don‘t see any reason to switch from whatever one is using right now.

Almost every time I find one of these interesting ML/AI/Science based Python projects I want to include in my own work, I run in major compatibility issues. Either a bound C library has changed its signature too much, or the Python lib never got adapted to version 3 (or 3.7 and another lib needs native types). To me it seems like Python is partly a graveyard of university projects nobody cared to continue. Not that Python is bad in general. When Google app engine support for Python came out I implemented a service together with two other devs (extending in-game functionality of a virtual world) that took up to a few million hits per day and was lots of fun to build. But developing in Python can easily become a package version nightmare, and most tutorials out there just ignore that, which adds a steep learning curve if you want to do complex projects in Python. pyenv and pipenv, which came out last year, only address parts of that.

This xkcd is quite fitting I think ?

I for one also have a (subjective) aversion to languages where whitespace has too much meaning. If you ever learned Cobol, you probably know what I mean...

  • Like 7
Link to comment
Share on other sites

I read some articles about the Django/Python super-man abilities and I got excited. Then I tried to run a test project and realized that I cannot simply setup the server just  as LAMP does !
This is real pain in the as$$ to setup a Django/python server, I guess PHP is more than enough for Web Apps.

Link to comment
Share on other sites

  • 6 months later...
On 9/5/2020 at 12:05 PM, pwired said:

On the job market I see a lot of junior and senior php coders wanted. I see hardly anything about python coders wanted.

I have the assumption that Python Dev is heavily wanted ? my bad . For last 2 years I wanted to learn Python/Django but it seems a lot hurdles. I lost interest at very first time with their Server Setup. In PHP the LAMP Server is super easy to setup for Python, they need some kind of extra steps. The I got confused if PHP can do everything what Python can ( atleast in Web/internet context  ) , whats the point of switching to Python/Django ? ? I have gone through numerous articles about Python vs PHP, mostly Python+ opinions but still  after 2 years, I am with PHP  !sure should I learn Python or Not. 

Link to comment
Share on other sites

8 minutes ago, JeevanisM said:

!sure should I learn Python or Not. 

If you have the time, never hurts to learn a new language. Python is very easy to pick up. You don't need to learn Django or use Python for web dev....there's lots of other stuff you can do with it.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Imo the most important part missing in conversations about one language vs. the other is context. Just using features for comparison is useful mostly to fanboys. One needs to look at existing knowledge, time to learn, amount of benefit from the learned language (short term and long term), team dynamics (hiring, on-boarding, finding devs already fluent), existing code, …. There's a reason there's so much PHP written for things objectively much simpler done in other languages – because all the above things often outweigh changing away from PHP. Like everything async/stateful (even just websockets) is a pain in the ass in php, because the common way to deploy php is stateless. Does that stop people from doing that with PHP? Nope, people take on a bunch of complexity to do it even with languages/runtimes out there much more suited to the task.

Take the leap from webdev to ML and the context is completely different.

Suddenly things like existing code don't exist anymore, ML is "new". ML needs to be learned anyway, so existing PHP knowledge is vain. Other people mostly use python for ML, so it makes sense to use them. Short term there's a clear benefit in moving to python for ML.

The same should apply to green field projects, but what today is actually properly green field (including team knowledge and such).

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

21 hours ago, LostKobrakai said:

Imo the most important part missing in conversations about one language vs. the other is context. Just using features for comparison is useful mostly to fanboys. One needs to look at existing knowledge, time to learn, amount of benefit from the learned language (short term and long term), team dynamics (hiring, on-boarding, finding devs already fluent), existing code, …. There's a reason there's so much PHP written for things objectively much simpler done in other languages – because all the above things often outweigh changing away from PHP. Like everything async/stateful (even just websockets) is a pain in the ass in php, because the common way to deploy php is stateless. Does that stop people from doing that with PHP? Nope, people take on a bunch of complexity to do it even with languages/runtimes out there much more suited to the task.

Take the leap from webdev to ML and the context is completely different.

Suddenly things like existing code don't exist anymore, ML is "new". ML needs to be learned anyway, so existing PHP knowledge is vain. Other people mostly use python for ML, so it makes sense to use them. Short term there's a clear benefit in moving to python for ML.

The same should apply to green field projects, but what today is actually properly green field (including team knowledge and such).

very logical analysis -  different tools for different uses

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...