My Experience After Three Years of Migration from PHP to Golang Language​

3 years ago I decided to be a Golang developer. At that moment I was a senior PHP developer and changed my stack to Golang. And become a junior Golang developer. But what is my main reason?

PHP has a lot of facilities and development is super fast. even if you know about CakePHP, it just needs to define a database, and then boom!!, everything becomes perfect. It will make a model, controller, and view by a single command.

But in maintenance it was terrible and in a high TPS system, it became a disaster. Yes Mr. PHP FPM I hate you. PHP fpm uses CPU and RAM in high requests and will ruin our server.

I need some thing super small, fast, and reliable. Golang is one of the languages I have ever seen. It is super small and super fast. But you need to have deep knowledge about software engineering and design patterns.

When we want to write a docker-compose for PHP, It will be dirty and hard but in Golang it just becomes 10 lines. and also the volume of the Golang microservice is less than 200 MB but the PHP container becomes to 2GB.

My Experience After Three Years of Migration from PHP to Golang Language
​

Go has a Goroutine mechanism, yes parallel programming exists in PHP, but Go handles it much better and easier.

PHP is perfect in the MVC model, but what if you don’t want to use this model? And also it is so hard to work with gRPC in PHP. In Golang every microservice has a different style and based on our requirements the structure of the program will be changed.

I am going to write more about my experience in my next article …

Stackademic

Thank you for reading until the end. Before you go:

  • Please consider clapping and following the writer! 👏
  • Follow us on Twitter(X), LinkedIn, and YouTube.
  • Visit Stackademic.com to find out more about how we are democratizing free programming education around the world.