In software development, a programmer will quite often come to a dead end when faced with an architectural decision that will have a huge impact on the future of his or her work for decades to come. At the same time, it is a decision that cannot be…
Often we need to merge multiple arrays together, this can be done very elegantly with the array_merge function:
$userIdsA = [1, 2, 3];
$userIdsB = [5, 6, 7];
// returns [1, 2, 3, 5, 6, 7]
$finalIds = array_merge($userIdsA, $userIdsB);
The array…
When the size of the database grows beyond millions of rows, it is advisable to start scaling the application and split the database into multiple physical servers.
The biggest problem of splitting a database into multiple parts is its subsequent…
Sometimes we need to shrink a large PHP script and compress several of them into one file. This comes in handy when we are creating a library that we will publish to the web and don't want anyone to interfere with it, or it is a useful script that…