The Proper Way to Measure Execution Time of a PHP Script

Hey there!

I’m going to give you a very useful snippet that you can use in all your php projects.

Execution time of a PHP Script is very important for numerous reasons.

The main reason that you should track your php script execution time is because Time matters when programming.

This can help you be more efficient in your programming and make sure your code runs smoothly and fast.

Instagram image from @motivational.coder

How to do it?

The idea is pretty simple, so, no worries!

You will need to define a variable at the very beginning of your project microtime() and one at the end.

After that you will need to subtract the end microtime variable from the start microtime variable and thats it.Also you can set the output value to only show the first 2 decimals.



Lets take a quick example of a use case.

You are building a project and something is slowing you down and you want to find out what exactly first.

You can calculate this with the script above to measure the php execution time of your script programatically and start from there.

You can wrap this snippet around any php script and get your execution time for that specific portion.

Here is a good example on what you could do with it:


Some tips to improve performance

Here are some tips to improve your overall php scripts performance and get the best out of your project.

  • Make sure you use the latest stable release of PHP
  • Try to use less calls to the Database ( if using a database )
  • Refactor deprecated functions of php with new versions of those functions
  • Stay up to date with PHP and latest functions and methods to use


Thank you for reading, make sure to check out my socials below if you want to see more from my side 🙂


React Native App Development Day 2 – Using Image Component

Hey everyone, it’s been a long time since I’ve worked on the little App project but I finally found the time to continue a few hours on it

Here’s what I worked on / learned..

I needed to implement a full sized image into the Card component we made earlier ( React Native App Development Day 1 ) that fits the screen perfectly.

Perfectly in this case is

  • full width relative to the Card component
  • correct aspect ratio whatever device you are on
  • proper height so that the image looks good

I’ve wasted so much time..

Since there were a lot of options on how to do this and none of them seemed to work, I’ve wasted a lot of time with trial and error until I figured out where I was wrong.



React Native App Development Day 1 – Card Component & Shadows

Hey there 🙂 If you don’t know about this project, go to Day 0 and check out the first post.

To start where I left off..

I’ve had an idea of using some sort of Card component and style it nicely to fit my needs. I knew that Native Base has a Card Component already built in so why bother creating one? Found out, it was not that simple as I’ve thought.

Long story short.. I’ve tried to customize it, customizing Native Base for React Native is not that easy as they say in their Documentation. In my opinion, if the documentation is shitty and you waste more time than you would if you were to build that specific thing yourself, there is no point in using it and complicating things any more further down the road.

I started creating my own Card Component..

It’s simple, I just needed a box with some content that I can manipulate easily. More exactly something like this:



React Native App Development Day 0 – Initiating the project

Last day I’ve asked my followers on instagram @motivational.coder if I should document my progress from start to finish on a new and simple app that I want develop, most of you said yes 🙂


Let me give you some info before I start diving into it..

I am new to React Native and I really enjoy working & developing with it, so this is going to be a small and simple ( at first ) application that I plan to release on Google’s PlayStore. It’s going to be dedicated to Romania only and it’s going to be helpful for anyone who is shopping online.

Starting off with something new..

For the sake of learning, I wanted to start this new project with Exponent for React Native and since I’ve heard mixed thoughts on it, I wasn’t really 100% sure if it would work out the way I wanted to. Decided to give it a try either way..

If you guys don’t know, Expo is a wrapper around React Native that is supposed to help you develop apps faster with extra built-in API’s and easier to manage projects. You can take a look at it on the official page if you’re interested.



How to solve Google play services need to be enabled / installed

I was lately installing React Native Firebase to my playstore app in order to use Analytics from google to track what my users are doing. That went well and it worked out properly. But one thing that didn’t went as planned is the Genymotion Emulator that I run on my macbook to test my app when I don’t have a device to test on, didn’t work properly anymore and it started shooting out a problem when react-native run-android my app.

More exactly it had a popup alert every time I would rebuild my app saying that Google play services need to be enabled in order for this app to run.

Lets sum up, if you are in this case

– You use Genymotion to emulate Android devices
– You just installed Firebase to your app
– You get this error when emulating the app "This app won't run without Google Play services"

Then what you need to do in order to fix it is pretty simple:

  • Make sure your Genymotion application is above 2.1.0 version
  • Start the Genymotion emulator, find the toolbar in the right and find the following button on the side and install GApps.
  • Restart your app and Genymotion and you’re done 🙂



How to start your own Servers List Website

If you’re looking to start your own Servers List Website and you want a detailed perspective on how to do this, then you should check out this guide.

Is it still worth it ?..

If you’re asking yourself if it’s still worth it, then you should probably change your thinking about this. Check the following spots:

  • It’s a niche that will never run out of business.
  • New games will appear constantly so you will always have new content possibilities.
  • People who own servers and want to promote it will pay you good money to put their server up front.

These are just a few reasons that should keep you on this idea, keep on reading, you’re doing great!

How should I start ?

Everybody wants to do it easy and fast, but guess what: It takes time and effort to build a great website and community that users will want to come back to for information. It is not a 10 minutes job that you do and just wait for the passive income to add up into your account.

So, actually, where should you start ?

You should start with the idea. You need to get yourself involved in what Game you want to target. Lets say you are a Minecraft player or Server owner and you have some kind of knowledge in that field ( this is a bonus for you ) and you want to start your own Servers List website, then probably the best fit for you would be to start a Minecraft Servers List related kind of website because you have some knowledge of the game.

We got the idea, now what ?

Now you need to start planning your strategy for what type of servers you will put in your servers list, how will you get visitors and why the users should come back to you. Minecraft is the most popular game and a lot of people have Minecraft related servers list so it will be tough for you to start one without thinking how to do it and how to promote it.

Choosing a niche inside the Minecraft niche would be a good choice. Lets say you want your Servers List to host only a specific type of Servers, like Bukkit or something else.

Things that you will need

Lets talk about things that you will need in order to get your website up and running.

  • A niche domain for your servers list ( You can get one from or wherever you want )
  • A web hosting or VPS that will run the servers list good and without problems. ( To note that many of the shared webhostings that you find for cheap, don’t support querying game servers, so you won’t have the possibility to get live statistics from that server )
  • The software or the platform that does this, the actual script, the heart of the Servers List. You can check out My portfolio and there you have plenty of options for different games and types of servers lists.

Installing and getting ready

If you want to choose one of my products to start your own servers list, contact me via email at with the title: “I want to start a servers list” and tell me about it and you will get a discounted price for my servers list products.

After you got the software and everything else ready, you need to make sure you have read the installation guide that my software has and then you can start installing it. Installation of my script, if done properly, shouldn’t take you more than 5-10 minutes.


Why should you want to customize your website? The answer is: because you want to be different and stand out. You can stand out by customizing the banners, the servers arrangement, how the servers list works ( if you have programming knowledge ) and there are many more.

I’m available for freelance and customization works for my software and if you are interested, don’t hesitate to contact me at


If you want me to go more in depth, leave a comment about it and I will try to do a continued version of this :).