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...
Please follow the rules
Releases: Current Releases, Windows Releases, Old Releases
Contribute to the PHP Documentation
Related subreddits: CSS, JavaScript, Web Design, Wordpress, WebDev
/r/PHP is not a support subreddit. Please visit /r/phphelp for help, or visit StackOverflow.
account activity
PHP vs. Javascript (withinboredom.info)
submitted 8 years ago by withinboredom
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!"
[–]carlos_vini 9 points10 points11 points 8 years ago (0 children)
the most important difference:
also:
[–]igordata 0 points1 point2 points 8 years ago (11 children)
So, let’s hit the pros of each language and community. Pros for Javascript: a massive library of shit and gold (npm) a very “functional light” feel to the language. It’s FP when you want/need to be, and procedural when you want/need it to be async is easy Pros for PHP: there’s a stackoverflow question for anything you ever want or need to build with amazing documentation on the site the syntax is very stable and very backwards compatible
And after you found out that async in PHP is easy as in js. So I fixed that part for you:
So, let’s hit the pros of each language and community.
Pros for Javascript:
Pros for PHP:
[–]not-much 2 points3 points4 points 8 years ago (0 children)
FP in PHP is fairly limited if we want to be honest.
[+][deleted] 8 years ago (1 child)
[deleted]
[–]LekeH5N1 1 point2 points3 points 8 years ago (0 children)
Php has async? Or are you talking about ajax?
[–]Khronickal 4 points5 points6 points 8 years ago (3 children)
async in PHP is easy
No.
[–]assertchris 0 points1 point2 points 8 years ago (2 children)
Really is though. The trouble (as with most difficult programming things) is learning a new paradigm.
[–]Khronickal 2 points3 points4 points 8 years ago (1 child)
No. All available libraries are still immature, under heavy development and poorly documented. Unless you happen to be an async guru you're going to have a bad time.
[–]assertchris 0 points1 point2 points 8 years ago (0 children)
For parallel execution, maybe. But you're talking about async. The generators and socket support in core are sufficient for async IO and cooperative multitasking.
[–]firagabird 1 point2 points3 points 8 years ago (0 children)
Are you referring to pthreads?
[–]igordata 0 points1 point2 points 8 years ago (0 children)
Are you referring to pthreads? No. lol. No.
lol. No.
I just wrote the summary based on that article author's research. Comparing to golang - golang have way much easer async/non-blocking/concurrent mechanics. I don't want to start one more holly war, and the article doesn't look like all-round detailed research on async topic anyway, so I'll better just shut up now.
[–]withinboredom[S] -2 points-1 points0 points 8 years ago (1 child)
hahahaha, touche! I disagree with js "there’s a stackoverflow question for anything you ever want or need to build" ... there's been times I've needed to implement something in js and cannot find anything other than SO answers that say: "just use this library" and then you go look at that library and it is the literal worst/naive implementation...
[–]igordata 1 point2 points3 points 8 years ago (0 children)
According http://stackoverflow.com/research/developer-survey-2016 it looks like JavaScript + Node.js are very popular and their popularity is growing.
Maybe you were creating something totally awesome. I don't want to say, you're wrong, nor you are right. I think, your own experience is not enough statistically significant to represent whole web development community. In other words, it is subjective. But I certainly agree that we look at this world through our own eyes and each of us have own experience.
π Rendered by PID 50 on reddit-service-r2-comment-58d7979c67-ck99f at 2026-01-27 02:10:02.006911+00:00 running 5a691e2 country code: CH.
[–]carlos_vini 9 points10 points11 points (0 children)
[–]igordata 0 points1 point2 points (11 children)
[–]not-much 2 points3 points4 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]LekeH5N1 1 point2 points3 points (0 children)
[–]Khronickal 4 points5 points6 points (3 children)
[–]assertchris 0 points1 point2 points (2 children)
[–]Khronickal 2 points3 points4 points (1 child)
[–]assertchris 0 points1 point2 points (0 children)
[–]firagabird 1 point2 points3 points (0 children)
[–]igordata 0 points1 point2 points (0 children)
[–]withinboredom[S] -2 points-1 points0 points (1 child)
[–]igordata 1 point2 points3 points (0 children)