
Ewww, You Use PHP? (2010) - yarapavan
https://blog.mailchimp.com/ewww-you-use-php/
======
ubuntuftw
My company's product backend is written in PHP. I'm currently rewriting it,
and when I started the process, I tried doing it in Node.js because 1) the
possibility of client/server code sharing and 2) that's what all the cool kids
were doing. That lasted all of a few weeks before the async nature of Node
made my head nearly explode. I scraped that and went back to PHP where you can
depend on code being executed line-by-line, synchronously, without hacks.

As a language, PHP definitely has some warts. But, it's come a long way, and
it keeps getting better all the time.

Personally, I don't think it deserves all the hate it gets. Some criticism is
warranted, but definitely not all of it. I think a lot of it stems from the
fact that the language is so easy to learn and lets you do things your own
way, which (at least in the early days) led to a lot of newbies writing
insecure code. See: register_globals (since removed).

That all said, I love PHP. It's simple, yet powerful. It grows with you, and
most importantly, it gets the job done.

~~~
jasonkostempski
"the possibility of client/server code sharing"

I have yet to see a good example where this was worth even considering. Model
validation seems to be the only real use case and there are so many potential
non-JS based clients that you'll likely need a more general solution for that
problem anyway. And even for JS based clients, usually the big pain is the UI
logic for showing users the errors and helping them correct it, stuff you
won't use on the server side.

~~~
golergka
I had one example of client/server sharing with C#. It was ASP.NET on the
server and Unity3d client: all the data model objects were shared and
serialization in both direction was a breeze.

~~~
maxxxxx
In client/server settings with a .NET frontend and a .NET WPF client you can
get a lot of code sharing. But in typical web apps with javascript frontend
and a a Javascript server I don't think there will ever be much sharing.

------
yarapavan
* Update (12/9/14): We’ve grown a lot since this post was written 4 years ago. Currently, our 7 million users send 400 million emails every day, which works out to just north of 12 billion emails a month. And yes, we still use PHP.

~~~
shunyaloop
Related slack php usage thread, Taking PHP Seriously, is at
[https://news.ycombinator.com/item?id=12703751](https://news.ycombinator.com/item?id=12703751)

~~~
yarapavan
Thanks for posting this. Some great discussion going on there.

------
importantbrian
Today is apparently PHP day on the HN front page. I'm happy to see a different
take on it than the normal hate I see it get.

~~~
edwinnathaniel
It might be a sign that after churns of programming languages (explosion) in
the last 2 years, people get bored re-writing solved-problems and started to
focus on the real thing: solving newer problems and/or making money.

Or... could be a sign that the community is maturing :)

------
ggregoire
> It’s always been difficult for us to hire really good developers, just
> because of where we are. Our office is here in Atlanta GA [...]

A lot of talented developers are looking for remote jobs.

~~~
s_q_b
It would be economically sensible to take at least a 10% haircut on my salary
to not have to commute, just based on the time-value of my labor. I look at a
commute the same way I look at travel: it is a cost to me and I expect to be
compensated for that.

As a decent dev with a decent CV, it would make complete economic sense for me
to work for a company remotely.

------
yarapavan
Link to dailymotion php deployment usecase -
[http://engineering.dailymotion.com/php-7-deployment-at-
daily...](http://engineering.dailymotion.com/php-7-deployment-at-dailymotion/)

------
Sir_Cmpwn
PHP might be getting better. But have you considered that most programmers
just don't want to use it? They've already invested in learning better
langauges and they aren't waiting on them to get better. The most important
choice you can make when starting a project is picking the right tools for it,
and PHP probably isn't the one. Lots of other tools are just as capable, and
often more so.

------
shylor
It would be interesting to see what PHP 7's speed can do for them.

~~~
arenaninja
Speed and lower memory utilization are great, but PHP7 really is just full of
goodies:

* Scalar type declarations

* Return type declarations

* null coalescing operator (the real MVP)

* spaceship operator

* introduced Throwable, big improvement to error handling

* removed PHP4 style constructors

* removed the old mysql extension

Most modern PHP codebases should be able to upgrade from PHP5.6 to PHP7
seamlessly

~~~
TazeTSchnitzel
> * null coalescing operator (the real MVP)

I'm glad someone appreciates it that much! Since helping introduce it, I
haven't found as much use for it as I expected.

~~~
arenaninja
25 uses in my current codebase vs 5 for spaceship

It's not so much about the count though, but the beauty of it:

$id = trim($options[$longCamelCaseID]['abcdefg'] ?? "");

A real godsend

