23 ms·
PHP is fantastic if you are starting from scratch and you don't necessarily need any third party libraries. PDO is very well done and the native database drive
by ChikkaChiChi 12y ago
PHP is fantastic if you are starting from scratch and you don't necessarily need any third party libraries. PDO is very well done and the native database drivers are some of the fastest available.
With a properly tuned nginx/fpm/apc stack, I've been able to deliver solutions that truly back up the results you see from comparison benchmarks like Techempower.
In many cases in web development, PHP can be the right tool for the job!
- girvo 12y agoWith HHVM + nginx you can really fly! Seriously, it's amazing how fast it is (and the Techempower benchmarks put it at #1 for anything with multiple requests and data handling!)
- frik 12y agoYou are spot on, Nginx+HHVM is really fast. I am an early adopter of HHVM (since Dez 2012) and it really shines on sites with thousends of requests per seconds. I heard PHP 5.5+ on Nginx (FPM) is fast as well. And I prefer PHP as I can code websites without the need of frameworks (PHP is "the framework") with a C/C++ like syntax. The idea of libraries is much older than frameworks, and in the end libraries are so much more flexible IMHO.
- tomschlick 12y ago> And I prefer PHP as I can code websites without the need of frameworks That either means A) you re-invent the wheel every time you start a project or B) you have your own implementation of commonly used items (your own framework) I personally would rather have a framework vetted & maintained by thousands of other developers than one I put together myself.
- chriswarbo 12y agoTo be fair, PHP's stdlib is essentially a Web framework. It comes with $_SERVER, $_GET, $_POST, header(), etc. built in, which other languages (Python, Haskell, Perl, etc.) would define in a framework. Hence there's no need to redefine stuff over and over. Hell, PHP is even a templating language by default, thanks to its <?php ?> tags. Of course, this doesn't answer the related questions: is PHP's built-in framework any good? Is it a good idea to include a Web framework in all scripts (even non-Web ones)? Is it a good idea to write all application logic inside giant <?php ?> tags in template files?
- frik 12y agoPHP, Node.js, Go and OpenResty have a versatile ecosystem with both libraries and optional (micro) frameworks. I prefer the newer trend of micro frameworks and for simple websites just raw PHP 5.3+.
- ihsw 12y agoUsing php-5.5 with php-fpm and nginx, can confirm. There are some gotchas that you will trip over along the way, but after that it's nothing but smooth sailing.