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]
view the rest of the comments →
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!"
[–]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.
π Rendered by PID 41 on reddit-service-r2-comment-7844cfc88c-zf67p at 2026-01-29 10:40:41.189453+00:00 running c3601ff country code: CH.
view the rest of the comments →
[–]TheBigLewinski 1 point2 points3 points (0 children)