TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

PHP vs Python (not a flame war, just a logical comparison of features)

12 pointsby Scott_MacGregoralmost 15 years ago

10 comments

dewelleralmost 15 years ago
I enjoy using PHP in spite of its quirks. But my main wish is that the PEAR system was a bit easier to use. After seeing some Ruby Gems in action, it made me wish that PEAR was a little slicker.<p>Does Python have a good and unified package installer like PEAR or Ruby Gems?
评论 #1549455 未加载
评论 #1549395 未加载
pbiggaralmost 15 years ago
You can't really compare languages based on feature lists like this. On top of that, I glanced down the list, and noticed a couple of innacuracies, such as the unset() thing. So I can't recommend someone to take anything from this (and this from someone who hates PHP and likes Python).
alinajafalmost 15 years ago
Whenever I see comparisons like this they're usually written by someone who prefers one over the other rather than 'a logical comparison of features'. This is evident in language like 'schizophrenic tableau of function names'. I prefer Ruby/Python over PHP, the syntax and language features are a lot more predictable and sane in those languages than PHP. But I really think a drawn out comparison like this is beating a dead horse.
kloncksalmost 15 years ago
As much as I hate to admit it, the fact that this is on Python.org Wiki makes it a biased source.<p>I gave it a chance and went ahead and read it. Sure enough, it sounded very biased towards Python with many PHP inaccuracies.<p>I really would be interested in a true "logical comparison".<p>edit: this is coming from someone who primarily programs in php &#38; python, but with a lot more php experience.
allalmost 15 years ago
I use Python a lot for back-end processing but seldom for anything upfront. I tend to prefer PHP there. I was asked to write a book on Python last year and actually included a section on how to use PHP together with Python when doing web development. The two can live together quite nicely if you play their strengths and weaknesses off each other.
评论 #1549534 未加载
jayroalmost 15 years ago
That's funny. It's actually more like a one-sided flame war. "PHP sucks and Python is awesome!" ;)
评论 #1549521 未加载
scotty79almost 15 years ago
&#62;&#62; the ternary operator/statement (... ? ... : ...) &#62; Retort: Python 2.5 has conditional expressions<p><a href="http://www.python.org/dev/peps/pep-0308/" rel="nofollow">http://www.python.org/dev/peps/pep-0308/</a> looks more like a hack than a feature
评论 #1550157 未加载
scotty79almost 15 years ago
&#62; one array type that doubles as a list and a dictionary. Dictionary keys are iterated in their original order.<p>Retort: Python 2.7 and 3.1 finally has standard ordered dictionary type (OrderedDict from collections) with basically same functionality.
st0palmost 15 years ago
Python might be the nicer language, php is still the language I encounter more at my clients.
gaoshanalmost 15 years ago
Based on that post they seem pretty equal. PHP comes out as slightly ahead on web development with Python being more general purpose.<p>In a nutshell, not an especially useful post.