Earlier quoted context omitted.
The only thing I think I don't like about Laravel is that it doesn't use Twig as the default template engine.
Fully agree. Check out twig bridge though.
Why so much hate for PHP?
61–70 of 74 posts
Re: Why so much hate for PHP?
#62Re: Why so much hate for PHP?
#63Earlier quoted context omitted.
Well for what it's worth, I keep reading that from people whose exposure to programming languages and techniques is limited to making LOB applications in PHP and maybe one or two other lowest-common denominator languages. Most people I know who have any real breadth of programming experience find PHP's language deficiencies glaringly obvious, even if they find it occasionally useful due to deployment requirements, et…
> if anybody knows how to use PHP properly I'd think it is somebody who has worked at Facebook, and you can't just dismiss natmaster's complaints with hand-waving that he must not have been doing it right. Well, considering the scenario he described in his own post, it's obvious that PHP wasn't used in the right way. Working at facebook itself, unfortunately, means nothing as i have no idea how their code actually is…
Re: Why so much hate for PHP?
#64TL;DR: Because we used it. Like many people, many years ago I learned php. It was easy to deploy, and make simple dynamic websites. Many hosting services provided support for it. I was quite happy to use it for these things. Then in 2008 I interned at Facebook. At the time, there had not yet been any attempts to improve the language by Facebook itself. Using php in an actual codebase - real world software - made me r…
What many folks forget is that the version of PHP Facebook has in Production (HipHop) is not the same version most have when they deploy PHP. Legacy & inertia has retained PHP at FB but it is far better managed then what others are doing with it today.
I have a list of few points and poor excuses used by folks to justify PHP as language of choice in today's times: http://www.theroadtosiliconvalley.com/technology/php-coding-... I am sure if Facebook were starting up today they would not choose PHP as their primary language of choice.
Re: Why so much hate for PHP?
#65TL;DR: Because we used it. Like many people, many years ago I learned php. It was easy to deploy, and make simple dynamic websites. Many hosting services provided support for it. I was quite happy to use it for these things. Then in 2008 I interned at Facebook. At the time, there had not yet been any attempts to improve the language by Facebook itself. Using php in an actual codebase - real world software - made me r…
Then just list a few of them. Your comment seems highly subjective and opinionated without any concrete examples.
Re: Why so much hate for PHP?
#66A quick dive into any PHP-related topic on HN should yield significant answers. Part of the hatred comes from the fact that the way people know PHP is from 2005, when it was essentially one really long procedural program. It's not so much that people ignore the recent upgrade in tooling/modern language constructs so much as people aren't familiar that they exist. However, these is still a lot of vitrol for PHP. Becau…
> Ruby is hilarious slow, for example. [citation needed]. Also, relevant Stack Overflow debate is available. [1] TL;DR: yes, of course Ruby is slower than, say, C, but today's bottleneck isn't hardware, it's developer productivity. (Developer time costs way more than hardware.) [1] https://stackoverflow.com/questions/2529852/why-do-people-sa...
That's until you try to scale things.
Re: Why so much hate for PHP?
#67Re: Why so much hate for PHP?
#68There are a number of reasons why PHP is so disliked by outside communities including but not limited to MAGZine's points. 1) As mentioned there are a number of language inconsistencies, much more so than comparable languages. This includes naming schemes for functions 2) PHP and most major projects written in it are insecure. Even up-to-date Wordpress installs are vulnerable to attacks. 3) Testing still isn't in vog…
Re: Why so much hate for PHP?
#69A quick dive into any PHP-related topic on HN should yield significant answers. Part of the hatred comes from the fact that the way people know PHP is from 2005, when it was essentially one really long procedural program. It's not so much that people ignore the recent upgrade in tooling/modern language constructs so much as people aren't familiar that they exist. However, these is still a lot of vitrol for PHP. Becau…
I'm surprised people aren't quicker to mention the fact that PHP was (and still is!) responsible for many simple SQL injection database dumps/hacks. A simple string termination was all it took. That I felt gave PHP a massively bad rap as they spent versions after that trying to figure out a way to prevent/deter it. Nowadays with wrappers it's thankfully less of a problem. Having just come off a Drupal project myself…
Re: Why so much hate for PHP?
#70Since everyone concentrates on the development side, let me just leave a note from actually hosting php: A standard, no crazy stuff, database-backed blog+login site made in Symfony consumes ~60MB of memory. Then discards it and starts again. On each request. Even if the bytecode itself is cached, it has to create/register all the classes and global objects it uses every single time. I think people should find that at…
If you tell a room full of Java and C++ developers with no experience to PHP, that on every request, everything gets loaded, and at the end of the request, everything (and I mean everything) gets torn down, you'll get a bunch of blank stares.
However, the web, in its nature, is stateless. So, having a language where nothing persists across requests (except that which you store/retreive by using cookies/session data) is suited to the web. Also, not having to worry about memory management or thread-spawning helped to make PHP the simple, accessible language that it is. No memory leaks!* ;-)
In loadtesting, I've found that PHP is almost always CPU bound. Yeah, you might be loading and unloading 60MB of memory each time, but a) caching (send those 304s!) and b) it's not like your memory is going to 'go bad' from loading/unloading Symfony.
That said, there might be something to keeping Symfony loaded in memory. In my own tests, loading the classmap is one of the longest-running tasks in simpler PHP applications.