Imagine you have a service responsible for returning search results and you want to use this service in your APIs, Admin area, and Homepage but you want to replace blank spaces with a dash in API response (or other changes) and not in another part of your application.


Tips for PHP developers to write shorter and high-performance code

For-Loop

I’ve frequently seen developers make a common mistake in ‘for’ loops in their PHP projects. As an example:

At the first glimpse, this code looks ok, but there is an issue with the performance! In each iteration, the ‘count’ function will be executed and if you are having a large array it will cause a performance issue.

A slick way to return a Boolean

This function is too long, let's reduce it to just one line!

We could just return…


I’m sharing my experience with a task assigned to me one year ago. It was a new feature in our system and I was responsible to finish it bug-free and in a short time.

Amir Etemad

Backend Developer, Flexitarian, Technology enthusiast

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store