Programming languages are sometimes funny… you probably heard something like “there is a right tool for each problem” but sometimes (or most of them rs) you don’t have the blessing opportunity to choose the correct tool, decided by you, to solve the problem. Then you realize you’re facing the screen thinking about what would be the best way to solve your situation with the tools you have at hand.
Ideally, we should know the tool we have and its strengths and weaknesses to avoid bad situations and avoid blaming the language due to our mistakes (sorry folks 😕).
I had experience with a few different programming languages already and with all of them I had to learn how to do the same thing with them differently, for example, some are more strict others are more permissive, type checking, null/none/true/false evaluation…anyways. No matter what, they had their particularities which had to be taken into consideration before making a decision or code.
PHP isn’t different than that, and perhaps the language I had to be more cautious than any other. At first glance, PHP seems to be very easy and definitely not verbose such as other compiled languages, but it can be very tricky if you don’t make sure you’re doing things the best you can.
As part of my efforts to go back to writing again, I want to start this series of techniques for writing a more defensive and solid code, also adding some integration techniques I’ve learned with the years passing.
To be honest this would be one big post but I realized it would become too big so I decided to have smaller pieces that are easier for me and for you to digest.
Have fun 😉