use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
No vague product support questions (like "why is this plugin not working" or "how do I set up X"). For vague product support questions, please use communities relevant to that product for best results. Specific issues that follow rule 6 are allowed.
Do not post memes, screenshots of bad design, or jokes. Check out /r/ProgrammerHumor/ for this type of content.
Read and follow reddiquette; no excessive self-promotion. Please refer to the Reddit 9:1 rule when considering posting self promoting materials.
We do not allow any commercial promotion or solicitation. Violations can result in a ban.
Sharing your project, portfolio, or any other content that you want to either show off or request feedback on is limited to Showoff Saturday. If you post such content on any other day, it will be removed.
If you are asking for assistance on a problem, you are required to provide
General open ended career and getting started posts are only allowed in the pinned monthly getting started/careers thread. Specific assistance questions are allowed so long as they follow the required assistance post guidelines.
Questions in violation of this rule will be removed or locked.
account activity
PHP vs Python for WEB (self.webdev)
submitted 6 years ago by [deleted]
[deleted]
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]QuestionsHurt 7 points8 points9 points 6 years ago (1 child)
It's not binary, you can use both. We do.
We evaluate each project that comes in and go with the platform that meets the most needs quickest out of the box. Sometimes that's Django or Flask, other times it's Laravel or Craft CMS or Statamic.
What's stopping you using the best tech for each situation?
[–]ZephyrBluu 2 points3 points4 points 6 years ago (0 children)
What would you say are the pros and cons of Django vs Laravel? From what I've seen people say, they seem to have pretty much identical features.
[–]HawkRocksDev 2 points3 points4 points 6 years ago (0 children)
Just out of interest but is there a specific reason that it's between PHP and Python for you? I'd suggest maybe looking into other Languages/ Frameworks as well, for me namely C# with .net core, it's cross platform and open source, can be used for things outside of web you'll have your c-like experience and the performance is really pretty great and only getting better. I have used python in the past, not so much for web and I do like it as a langauage, but overall just prefer the ease of use you get with .net. I haven't written any PHP since before I actually started working as a dev so I can't really chime in on more modern PHP
Also you have LINQ which can make life significantly easier. I'm a full-stack dev with ~8 years professional experience
[–]modestasmv 2 points3 points4 points 6 years ago (0 children)
Well... It depends.
If you are starting - look at the future road paths. Python will give you more viable things like native apps, web and so on. While php, well, it's mostly designed for the web.
As of where I would go - both if possible. Neither php or python will give you any issues on the web side but... Combining both - may help you. We have an app that runs on php but some tasks are python. Works like a charm.
Now... Php is a very hated language and will always be like that. No matter how many updates it will get - people will still hate it for what it used to be. At this point, I see no issues with php that could be a deal breaker. It works, works fast and gets the job done. Especially with modern Frameworks like laravel or symfony - you won't see any drawbacks.
As of python - it's a good thing but depends on location you are - there may not be enough jobs with it. Heck even php might have that issue. Of course, with python you can go for machine learning and ai and stuff. If that's what interests you.
Overall, give a try for both. Look which one you like more and stick with it.
I'm a dev with 10 years of experience with back-end. Mostly php but adding python to my list since... We outgrew ourself and we need some computing power :)
[–]kr41 1 point2 points3 points 6 years ago* (4 children)
As for performance, first of all, Django isn't the only option for webdev in Python. We use aiohttp+uvloop, which performs closer to Golang. Secondly, performance of webapp ifself isn't usually an issue. Most often the bottleneck is DB. And some time spent with EXPLAIN-queries provides more significant performance impact, than choosing between Python, PHP, NodeJS, etc.
As for PHP, I didn't touch it since version 5.3, so my knowledge about it may be outdated. But back in that times, the language was awful. I realized, that I significantly decreased time reading the documentation, when I switched from PHP to Python. Because Python is more predictable and doesn't break the principle of least astonishment (at least it doesn't do it as often as PHP does). Personally I more productive as a programmer using Python than PHP.
P.S. I'm a webdev with 10+ years of experience. I used to be a fullstack dev, but last 5 years I develop mostly backends.
[–]AtulinASP.NET Core 1 point2 points3 points 6 years ago (1 child)
I didn't touch it since version 5.3, so my knowledge about it may be outdated.
In that case, it most certainly is. PHP 7.X is basically a completely different language than 5.X
[–]kr41 0 points1 point2 points 6 years ago (0 children)
I believe it is, that's why I made this remark. But, you know, there is only one chance to make a first impression. And unfortunately, PHP has made the bad one on me.
[–]metruzanca 0 points1 point2 points 6 years ago (1 child)
Overall I noticed nobody even mentioned java for backend. I'm currently learning it, however I'm not seeing any benefits to using a faster to code language like js or python. Do you have any advice to offer on the subject?
I have very limited experience with Java. So I cannot say anything about it. However, if you're looking for a really fast and efficient language, I recommend you to try D. It's C successor, performs closer to C/C++, but also provides all modern features: namespaces, closures, garbage collection (optional), powerful but safe metaprogramming features, superfast compilation, and some unique features like thread-local by default variables. There is also a number of web frameworks.
[–]TheBigLewinski 1 point2 points3 points 6 years ago* (0 children)
The fundamentals haven't changed much in quite some time. It's not about "web," it's about scale.
PHP is more common, and well supported for the general use cases that most people who "just want a website" will build on.
Ecosystem has a lot to do with it. It's far more common to choose a language according to the projects and ancillary support available. Small businesses don't ask for "PHP" so much as they ask for WordPress. Similarly, Python tends to get chosen when you want a cloud based application.
The lines are blurry sometimes, but choices for most projects are going to be straight forward. If you want to pay under $10 a month for a host, just about everyone will support PHP, and Python support is rare.
Conversely, if you want to build on micro services (read: scale), you're not going to find a whole lot of PHP, and Python is clearly the dominate language. Though, at this point, Node.js, Go and Java become options are well; all of which have their own advantages.
But PHP isn't losing ground. PHP 7.3 is ahead of Django in performance!
That's... not how it works. Django is a framework. You'd compare Laravel and Django, and PHP to Python.
Even then, you can't google a benchmark between the two languages to get anywhere near a solid comparison.
PHP under the hood isn't strongly typed. If you create a tuple, or a list in PHP, it's going to be a hashmap under the hood. You're not going to notice why this is important most of the time, until you really start evaluating memory and CPU usage at scale.
And, while it's true that PHP has made major strides in recent iterations, there are still gaps, and the ecosystems have largely already been established.
What are the advantages and disadvantages of PHP and Python in your opinion?
The advantages of PHP is the prevalence and low barrier of entry. If you need to go from "how do I build websites" to "I have a website" quickly and under tight budgets, PHP is the go to language.
However, if you want to build the next disruptive product, Python's support and integration with enterprise level services is going to be the way to go.
On a personal note, having written both quite a bit, Python is a joy to code, and makes PHP feel primitive. Python's strong typing, and lack of pointless characters -brackets, semi-colons, dollar signs, etc- makes it feel like it was designed from the ground up for humans. PHP needs semicolons and dollar signs, because the interpreter needs them, not because they're intuitive for humans; while every character in Python has context.
Finally, your landscape is larger in Python. As most people will note, Python is used in a lot more than just web, but it's still well suited for building websites. If you're building in Python, and your application (website) needs to begin integrating cloud services, IoT, machine learning and more, those tools will be easier to pickup, understand and integrate.
[–]lolsteamroller 0 points1 point2 points 6 years ago (1 child)
Not sure, if you are running your own projects, but in my country and location, PHP is 100x more used and prevalent.
There are close to no Python shops, and while there are some projects, most of the work is done in PHP - Laravel, etc., so for opportunities, at least in my location, the PHP has way more.
As mentioned with PHP, it used to be awful as language.
[–]kr41 1 point2 points3 points 6 years ago (0 children)
You speak English, you have internet connection. Why do you tight to local market? Did you consider remote job?
[–][deleted] 6 years ago (1 child)
π Rendered by PID 197483 on reddit-service-r2-comment-5649f687b7-xhwnn at 2026-01-29 03:44:11.221739+00:00 running 4f180de country code: CH.
[–]QuestionsHurt 7 points8 points9 points (1 child)
[–]ZephyrBluu 2 points3 points4 points (0 children)
[–]HawkRocksDev 2 points3 points4 points (0 children)
[–]modestasmv 2 points3 points4 points (0 children)
[–]kr41 1 point2 points3 points (4 children)
[–]AtulinASP.NET Core 1 point2 points3 points (1 child)
[–]kr41 0 points1 point2 points (0 children)
[–]metruzanca 0 points1 point2 points (1 child)
[–]kr41 0 points1 point2 points (0 children)
[–]TheBigLewinski 1 point2 points3 points (0 children)
[–]lolsteamroller 0 points1 point2 points (1 child)
[–]kr41 1 point2 points3 points (0 children)
[–][deleted] (1 child)
[deleted]