Skip to content
no php logo

Dear Go — Thank You For Teaching Me PHP Was A Waste of My Time

I am as old as the hills and I started programming computers with assembly language in the 70’s. I’ve been looking for something to kick-start my cloud projects. Now I feel rejuvenated with some easy successes in Go!

This “letter in a bottle” will hopefully be found by other poor slobs like me who are even thinking about using PHP for their cloud project.

I programmed the PDP8 with flip switches in a computer lab at Northwestern University in 1977

To assert my tech cred, I could bore everyone with the story about flipping switches on a PDP8 in the musky subbasement of a famous Midwestern university, or I can get to talking about what’s actually happening today for server programmers with just a dash of history.

I’ve been using and learning about nearly every computer language and database technology since the late 1970’s. The last time I was serious about PHP as an app server platform was way back before PHP 5. We didn’t have classes and the other Object Oriented Programming capabilities that has given PHP more life lately.

Three years ago, when I needed an app server for my Salesforce project, I turned to PHP out of necessity. It was the only server platform I could deploy at the scale I needed. Given my time constraints, I probably could have done a better job configuring my servers, picking platforms, etc. So maybe my comments are colored a bit by my lack of expert-level PHP knowledge.

I definitely had fun doing the project. I was delighted to see that PHP 7 had evolved from a kind of ad hoc scripting language to a real developer’s tool that be used to create large codebases that really do something. WordPress uses PHP, right?

But, today I regret that decision to go with PHP. I am sure I would have been scared off by Go’s newness in 2015, so I don’t know what else I should have picked at the time I needed it.

It is weird how Go reminds me of FORTRAN

Now, I’m not saying that PHP is truly crap for cloud applications…actually I’m lying. It is total crap for cloud apps, and if you’re thinking about using it you should dump it today.

Five years from now PHP will be degraded to COBOL status. It will be a language that will employ hordes of mediocre programmers who are managing mediocre, boring code. I’ve seen enough patterns in the IT industry to be confident advising system architects that picking Go over PHP will get you promoted.

Go Will Own Serverless

The term serverless is in an over-hyped state right now, so it means anything to whoever is selling the concept at any moment.

To me, serverless means code in the cloud that executes a single function that manages resources in my REST API.

While the definition of serverless is up for debate, one thing people can agree upon is that Go is now challenging Node is the most effective language to use in a serverless endpoint.

Go, aka Golang, is a new language from Google that is designed for today’s cloud apps, and it is where all the good cloud and server programmers are headed. Deploying serverless with Go can be done with just a handful of source code files. 

AWS Lambda is the most popular implementation of Serverless with Go

Here is the curious fact that made me pay attention to Go — Amazon adopted Go as a language for their AWS Lambda serverless platform before Google could release a similar capability in GCP. That must have stung the GCP team!

AWS is obviously responding to customer demand by being the first to support Go in new, lower-cost service offerings like Lambda. 
Azure can’t be far behind.

Why Will Go Win?

Go wins because it strips away all the crap that has been building up in languages ever since we left FORTRAN and COBOL behind in the late 1980’s.

Go revives some long-lost concepts in programming, like minimalist code, pointers and a direct approach to data streams. I can see the Go team’s point about how object-oriented programming (OOP) has wrapped things up in layers of complexity and abstraction that we may not need for every situation.

The new Go logo

It all got started in the 1990’s when Java became the defacto enterprise standard for inter-process communication.

The sheer verbosity of Java is a problem, and the number of class files for a project can skyrocket. Java clearly has not kept up. PHP 7 is now noted for being more Java-like with its extensive support of classes and methods. I have got to wonder if that is a good thing!

Rob Pike, co-inventor of Go, likes to note in paisley smoking jackets that all languages are becoming more like each other. Go, on the other hand, was designed by computer science gods to go really fast on servers and do tons of stuff in the background that you really need.

With a spike in the end zone, Go Cloud is the latest indication of Go’s pending dominance. This project introduces a normalization layer where you can marshal resources from any public cloud with a single Go app.

So Long, PHP

For me, it’s bittersweet. While I was deploying my PHP server, I was also leveling-up on my Salesforce Apex skills. Apex is a close cousin of Java. I’ve had many exciting discoveries as a PHP programmer. I loved weaving my new Java knowledge with the OOP capabilities of PHP.

I now realize that OOP not suitable for cloud apps. Java sold PHP down the OOP river.

It is time to forget that advice of staying with what you know so you don’t waste time learning a new tool. If you are still using PHP for your server apps then Go is that good and worth the risk.

While OOP made poor, type-less PHP behave more predictably, OOP has hopelessly bloated PHP to the point were it is now a bad decision to maintain using PHP for your server apps. The momentum and features of Go make it the winner for the next few years, at least. It is time to switch.

Soon, people will start thinking this is a true expression: COBOL == PHP.