
Ewww, You Use PHP? [2010] - anu_gupta
https://blog.mailchimp.com/ewww-you-use-php/
======
calibraxis
> thinking nothing interesting could possibly be done with PHP

Sadly, a lot of incompetent developers email each other articles like this, as
fodder for dev team language flamewars. This quoted sentence is likely
hyperbole, but they take it seriously and strawman people.

(Naturally, language evaluation is multidimensional. You consider
alternatives, foresee tradeoffs, etc. PHP can be right/wrong in your
situation.)

I knew programmers (and their CTO) who trotted out such articles to defend the
broken PHP framework which they used to run half the business. I'm sure the
framework's own authors would be aghast they still used it. The team working
on it had near-zero productivity; virtually all spent maintaining the beast.
New hires were flabbergasted at how slow the webapp was, which harmed the
productivity of most in the company. One maintainer had a private project to
incrementally rewrite the shit in another (very popular) language; the CTO
indulged him but refused to support it.

(Mercifully, the company got put out of its misery. People might counter that
the PHP codebase didn't kill the company. But of course that's not how it
works. Incompetence suffuses many such decisions; each of which is just a
facet of the same incompetence. And each incompetent decision reinforces the
others.)

------
ThomPete
PHP is the duct-tape of programming languages. It might not be pretty but it
gets the job done, and getting the job done is all that really matters.

With the exception of JavaScript which is also "wrong" by many puritan
developers opinion, PHP is the only language that is welcome to complete
novice programmers. All other languages require a lot of setting up.

Furthermore the ease at which I can combine JavaScript with CSS with HTML with
PHP is one of the major reasons it ever got so popular. No other language
allow me to do that.

~~~
huskyr
> PHP is the only language that is welcome to complete novice > programmers.
> All other languages require a lot of setting up.

One thing that is often overlooked with PHP is the fact that the deployment
process if extremely easy, even for novice programmers. Simply use
FTP/SFTP/SCP/whatever to copy over your files to a server, reload your
browser, done. It's completely optimised for the scenario where you simply
want to create a webpage.

Compare that to something like Python, which is very 'novice-friendly' as
well, but needs quite some steps before you have a working website deployed on
a server.

~~~
mercurial
Really depend on your hosting provider. I use gandi, and deployment is as hard
"git push gandi master && ssh login@host 'deploy default.git master'". If you
administrate the box yourself, I haven't found setting up, say, Apache with
Python particularly hard, assuming you have enough sysadmin knowledge in the
first place.

~~~
dewey
> and deployment is as hard "git push gandi master && ssh login@host 'deploy
> default.git master'"

That really isn't on the same level as "ftp index.php to shared webhosting
provider" for most people and that's exactly the point the parent comment is
trying to make.

~~~
mercurial
Well, you can do that too. However, how does "ftp index.php" work once you use
dependency management?

~~~
dewey
"dependency management" doesn't really come into play with the scenario we are
talking about which is:

"It's completely optimised for the scenario where you simply want to create a
webpage." [for a novice programmer]

I recommend you read over the parent comment again:
[https://news.ycombinator.com/item?id=8709025](https://news.ycombinator.com/item?id=8709025)

~~~
mercurial
I'll gladly grant you that point: it is easier to deploy a PHP application
which solely relies on the standard library. Outside of that, PHP isn't easier
than more well thought-out solutions.

~~~
ThomPete
And for many thats enough and is one of the major reasons PHP is popular.

------
boomlinde
The article mischaracterizes the criticism agains PHP as boiling down to
thinking that nothing interesting can be done with it. In doing so, it fails
to respond to what criticism against PHP typically boils down to: PHP sucks.

------
Garbage
Recently I worked on a PHP project for a month. And heard same "ewwww"
reactions from people. And even though I was skeptical about PHP, I must say
it was fun. It wasn't the same PHP I used 6 years back. PHP has come a long
way since. Frameworks like Symfony (Rails equivalent) is just amazing to work
with.

In total, I think people should give PHP another try. It's worth it.

~~~
mszyndel
Please don't say Symphony is Rails equivalent because t's very misleading and
basically not true. There may be some similarities but they're nowhere close.

~~~
Shorel
I propose to call Laravel the PHP Rails equivalent, instead of Symphony

(cue the torchs and forks)

------
FabianBeiner
A bad developer will produce bad code in whatever language he is using. If
asked, I’d tell everyone “stick to your guns”. Use, whatever gets the job done
most quickly and efficient.

~~~
erhardm
A good developer uses the best tools available, because she/he knows the value
of using them.

~~~
innocenat
No. The value of knowing your system well far exceed the value of supposedly
best system (of which is really arguable). Especially if it's a rush job,
using tools you know well will drastically reduce time needed, because you
already know in and outs of such tools, and is able to identify buggy part
quickly.

Also, as we are talking about web development, what is best tools? ASP.NET?
Rails? Django? Go? J2EE?

~~~
tormeh
JSP is an improvement on PHP, I've heard.

------
knappador
Most large companies with well-oiled legacy systems actually are not that bad
to work with. I've seen the guts of a large PHP system, and while it was still
re-inventing the wheel all over the place, they had still solved all of their
problems and had established practices that encouraged stable business. Not
interesting, but neither are consolidate businesses to begin with.

PHP will cease to be gross when it's not just the large implementations that
are very nicely done. This is not the PHP that exists in the vast seas between
these islands. PHP is not something that a rotational employee or someone who
is career-conscious will choose or accept for long. They want to work at your
company for a while. This can be good. PHP is a career limiter in a way and I
think the cringe reaction is a natural tendency to want to open up the
conversation to see if what could be a good rotational job is also a toolchain
dead end. Career conscious programmers don't want dead ends.

The gripe is and always will be that PHP encourages bad practices because it
includes a bunch of "features" that are undeniably prone to bad habits. It's
not personal. Really, we don't want companies using PHP well to die. We don't
want the programmers using PHP to go away. We want PHP to stay put because
better tools are out there, and anything that perpetuates the use of PHP in
_new_ products feels gross. It feels especially gross to the career-conscious
young ones. Sorry.

------
nikon
As a recovering PHP dev (I haven't touched a line in over 2 years) I'm happy I
no-longer use it. It's inconsistencies drove me insane and I hate the F'ing
dollar sign!

However I seem to have swapped that inconsistent, badly designed language with
Javascript.

------
Wilya
_We’ve built a framework for developing applications in PHP specifically
designed to allow for fast innovation in the high-load, high-performance
environment we live in every day while still keeping the API extremely simple
to deal with._

Why go with PHP and have to roll your own framework, when you can go with
something else, and leverage all the great work that has been done by the
Django/Rails/whatever folks? This post tells me all that they have
accomplished, which is cool, but doesn't tell the most important thing: why
did they choose PHP?

I have to take missions in PHP (Symfony2 and Zend Framework) from time to
time, and it really makes me appreciate how much more advanced Rails is. And I
don't mean advanced as giving me lots of options for doing obscure things. I
mean advanced as doing for me all the repetitive stuff that I would have to do
anyway, so that I have much less code to write, much less room to introduce
bugs, and I can focus on what really matters. The PHP ecosystem is trying to
replicate that, but so far, it's still quite far behind.

~~~
krapp
>Why go with PHP and have to roll your own framework, when you can go with
something else, and leverage all the great work that has been done by the
Django/Rails/whatever folks?

To be fair, no one _has_ to roll their own framework in PHP, it has frameworks
aplenty. I don't know why anyone would do that.

~~~
alexbilbie
I wrote an API at work which was originally written in Laravel because it was
fast to prototype in.

I've since replaced it with my own "framework" which is mostly a very thin
wrapper for several really good packages (router, DI container, events
dispatcher and query builder wrapper).

I'm getting 10x performance out of it than I was with Laravel, and overall
it's a very small codebase which is easy to understand and test.

So yes, no one "has to roll their own framework in PHP", but there sure are
advantages to do so if you know exactly what you need and how to get there.

~~~
Shorel
Do you have a public github repository with that ?

~~~
alexbilbie
The wrapper can be found here
[https://github.com/alexbilbie/proton](https://github.com/alexbilbie/proton)

~~~
fredsted
It seems to me that a microframework like Silex or Slim would be appropriate
as well

------
joepie91_
I can't help but notice how virtually every PHP "proponent" is arguing how PHP
is "not completely terrible", rather than arguing how PHP is "good". That's
rather telling.

~~~
krapp
I don't understand the reason for the quotes around 'proponent', but it's
perfectly reasonable to say that, yes, despite its flaws, PHP is adequate for
its purpose. There are valid reasons to choose it, and valid reasons not to.

Of course, you could say that about every language, and many do[0].

[0][https://wiki.theory.org/YourLanguageSucks](https://wiki.theory.org/YourLanguageSucks)

~~~
joepie91_
I put quotes around "proponent" because it applies to pretty much all
arguments I've seen in favour of PHP, not just those of people who try to
actively 'promote' it. I couldn't find a more accurate word to use there,
really, so I settled for quotes.

------
philjackson
I was lucky enough to meet the guys at Mailchimp a few years ago when my
startup was working with them on a project.

It's a great company; super offices, wonderful people and a sustainable,
profitable business. If I wasn't in England, I would consider pushing hard to
try and become a part of what they're doing.

~~~
Artemis2
I think that since Mailchimp has grown strong enough to hold a consequent part
of the email-sending software market, unsubscribing from newsletters/spam has
been a lot more easy than before.

------
Pezmc
I think the key problem is more that PHP is easy for developers to pick up and
there is a lot of misinformation, in particular very outdated PHP 'tutorials'
out there that have the whole idea quite backwards.

As it's often the first web development language picked up by people, who may
not necessarily know what they're doing, it gets a bad reputation. Used
correctly, however, it can be just as powerful as any other web development
language.

~~~
joepie91_
> Used correctly, however, it can be just as powerful as any other web
> development language.

That's a disputable statement (as I mentioned elsewhere, take long-running
processes as an example), and even if it _were_ true, that doesn't make it the
correct tool to use. You can hammer in nails with a wrench as well, but you
should still probably be using a real hammer.

~~~
erhardm
PHP hammer[0] made using the specification[1]

[0][https://secure.flickr.com/photos/raindrift/sets/721576294929...](https://secure.flickr.com/photos/raindrift/sets/72157629492908038)
[1][http://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-
design/#a...](http://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/#an-
analogy)

------
fredsted
While this is an old article, I agree, and PHP has only gotten better these
past years. Not to mention tools like Composer, Laravel and Yii – most popular
CMS systems are built in PHP too: Drupal, WordPress, TYPO3. Being an expert
PHP programmer opens you up to a lot of possibilities, and while it has some
idiosyncrasies, it's not like JavaScript, ASP.NET or Python doesn't have their
own share, too.

~~~
joepie91_
> Not to mention tools like Composer, Laravel and Yii

Virtually every language commonly used for web development (Python, Node.js,
Perl, Ruby, Lua, ...) has equivalent or better tools. This is in no way
exclusive to PHP.

~~~
Implicated
I don't believe he intended to infer that they were at all exclusive. Seems to
me that he was just mentioning them as aspects of the language that have
improved recently.

------
claudiug
the post is from 4 years ago. we put rosseta on a comet meanwhile. Also, php
has changed and with the new framework like laravel things look fine.

~~~
justincormack
I don't think any PHP was used to put anything on a comet recently.

------
ArtDev
PHP has come a long way in the last few years. Just like Javascript, the
language has changed dramatically for the better.

------
dude81
Not sure of this Ewww, much of the bigger sites like Facebook and Flickr, both
use PHP..! This "Ewww..!" AFAIK is beginner coders perspective. Some company's
are promoting this kind of things on language because they need different
skill set people in the market. As an Architect, it is best to know as much
languages as possible.

------
alexcroox
There are 2 types of programming languages, those that people love, and those
that people actually use.

~~~
elmin
I both love and use Javascript and Go.

------
yc1010
I get this all the time, started with C and Java back in university well over
10 years ago, but after doing a few projects with PHP and starting a few
personal projects (one of which became rather infamous years later lol) i got
hooked

In all this time there has been a huge change in the PHP world

TBH if a "developer" cringes their nose at a very capable tool, just because
it is not the latest "cool" thing, It tells me a lot about them.

~~~
joepie91_
Speaking as somebody who has done PHP for some 8-9 years, I still cringe my
nose at it.

See, the thing is, PHP _has_ gotten better. That's not in dispute. The problem
is that, even after it "has gotten better", it's still _far_ behind most other
options that are commonly in use, and still highly inconsistent and
upredictable. It is rather telling in and of itself when you have to use
"well, it has gotten better" as a crutch to argue that, _at least_ , it meets
a minimum standard of viability.

Frameworks don't _really_ solve this problem. Fundamentally, you're still
working with a language that does some really weird things - things that are
weird enough to cause near-untraceable bugs and completely unexpected
vulnerabilities. You can slap a lot of abstraction onto it, and it _does_ make
it less unwieldy, but in the end you're still limited by what the language or
platform has to offer you in terms of inherent consistency, predictability,
and debuggability.

Just take, for example, PHP's CGI-like nature. Yes, it is _theoretically_
possible to have a long-running process, and it's _theoretically_ possible to
implement real-time services with it, but it's going to be a major headache
and incredibly hard to maintain. The tools are just not really there. Any
solution you come up with will, in the end, be a giant hack.

Don't assume that somebody who cringes at PHP is just somebody who likes
jumping on bandwagons. There are very real and rational reasons to dislike
PHP, even (especially!) as an experienced PHP developer.

~~~
yc1010
PHP doesn't do EVERYTHING but it is good for surprisingly a lot of cases

What happens when you have existing code in Java or python that does something
you do not wish to reinvent the wheel with is you simply interface/bridge with
from you PHP code.

Right now I have 5 servers running python batch jobs processing some data (for
a few months now) which is called by php with results being added to datastore
for later access with php

In the past I worked on an asset tracking system where we collected data from
RFID readers, whole system was done in PHP with some glue Java and C code for
more "to the bone" edge cases

Everything I have done in PHP i could have done in C which I first learned and
still use alot of, doesn't mean I want to spend my life wasting it on 90% of
cases where a quick php script does the job within reasonable time

I never claimed PHP is "awesome" or whatever you think I did, but it is a very
capable language at getting things done fast, especially if you know what you
are doing

Yes there are armies of noobs giving PHP a bad name, but instead of turning
your nose at them one is better helping them and showing them how to do things
better

~~~
imakesnowflakes
The most dangerous thing about PHP is it's amiable appearance. But it's
friendly appearance is like a car without seat belts. "Hey, look, there is
nothing restricting your movement inside the cabin.".

The horrid (and unfixable) nature of the language does not become apparent
until after you use it for a while. (How long it takes may vary, but you ll
hit it eventually, if you keep yourself in good company.). So if you list
features of PHP, you might get a list of nice features. But every one of them
will be subtly broken when put to real use...

------
peterhi
Well this article is over 4 years old, which is positively Paleozoic in
language development terms. But I am sure that the discussion here will be
equally out of date.

Can we have less of these sort of articles please, it was a waste of my time
skimming it.

