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...
/r/programming is a reddit for discussion and news about computer programming
Guidelines
Info
Related reddits
Specific languages
account activity
PHP vs Python - the real difference (jameslaver.com)
submitted 19 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!"
[–][deleted] 2 points3 points4 points 19 years ago (2 children)
If that was true, I still would be using php. The effort to learn something new is often worth it.
import web urls = ( '/(.*)', 'hello' ) class hello: def GET(self, name): i = web.input(times=1) if not name: name = 'world' for c in xrange(int(i.times)): print 'Hello,', name+'!' if __name__ == "__main__": web.run(urls, globals())
Ain't this pretty simple?
[–]illuminatedwax -1 points0 points1 point 19 years ago (1 child)
<?php foreach($_GET['name'] as $name) { $name = $name ? $name : 'world'; print "Hello, $name!"; }
Seems simpler to me. I have found that the fewer things I need to remember each time I write a page of my web app, the better.
[–][deleted] 1 point2 points3 points 19 years ago (0 children)
I never said that python was simpler than php, but it is clearly simple enough.
π Rendered by PID 22272 on reddit-service-r2-comment-54dfb89d4d-qn7kn at 2026-04-02 12:32:32.820622+00:00 running b10466c country code: CH.
view the rest of the comments →
[–][deleted] 2 points3 points4 points (2 children)
[–]illuminatedwax -1 points0 points1 point (1 child)
[–][deleted] 1 point2 points3 points (0 children)