4 ms·
PHP wins because you can write a few lines of code in single file, shit it into an apache folder, and you have a fully functional front and backend of a web app
by skizm 5y ago
PHP wins because you can write a few lines of code in single file, shit it into an apache folder, and you have a fully functional front and backend of a web app. There is no other web framework / language that is easier to get started with.
I've always had this dream of writing something like "PyHP" which was the same thing, except you put python files into an nginx folder and anything sent to stdout is sent to the browser, but I've never gotten around to it. Would love if someone made this.
- ksec 5y ago>I've always had this dream of writing something like "PyHP" Similar here, Something Ruby-PHP. But even PyHP will do for me. I think the problem is PHP was designed by someone who just want to get shit done and absolutely dreaded programming. Versus programmers who just wanted to create a beautiful programming language.
- sanderjd 5y agoI was able to do this with erb (ruby templating language) very similarly to php scripts eons ago. It just never caught on to do it that way for other languages because php already had that market sewn up. This isn't disagreeing with you, just saying that it is this way for cultural rather than technical reasons.
- m000 5y agoThey made it a long time ago. It's called CGI [1]. Seriously, there's no inherent PHP advantage so you have to build something new. It is only that Apache package maintainers started shipping a mod_php package that required almost zero configuration to get up and running. Then every other web server followed suit. On the other hand, alternatives for other languages were either slow (i.e. CGI-based) or harder to configure (e.g. mod_python [2]). [1] https://docs.python.org/3/library/cgi.html https://docs.python.org/3/library/cgi.html [2] http://modpython.org/ http://modpython.org/