Autoloading third party libraries in PHP has become much less of a pain since the introduction of Composer. In this article we will see how this can be done for libraries that do not comply with the PSR-0 autoloading specification.
With the release of PHP 5.5, so-called generator functions are now available. Generators can among others be used to decrease the memory usage of your web server. This article gives you an overview of the generators in PHP 5.5.
If you have ever needed to calculate the age of someone based on their date of birth, then you might have been left puzzled at first. Many people seem to over complicate things, so in this article, a simple function is provided to convert dates to ages.
The binary search algorithm is an important algorithm in computer science. It solves the problem of searching large data sets efficiently. Luckily, the algorithm is quite simple to implement. This article shows two implementations of the algorithm in PHP and discusses the efficiency of them.
Making multiple concurrent AJAX requests to a PHP script, for example, may have left you wondering why the requests are not executed in parallel as expected. Rather, the requests are blocking each other. Chances are that this is caused by using sessions within the PHP script.
Using transactions in databases is often necessary and useful. If several database operations depend on each other, then it was both easier and prettier to make use of transactions. This article shows how the Zend\Db makes database transactions easy to use.
Performing case insensitive searches for things such as attribute values can be quite a pain with XPath. There is a well known workaround available, but it is not so pretty and clean like one would hope for. PHP developers are also limited by the fact that PHP does not implement XPath 2.0. This article shows an additional approach that helps keep XPath queries simpler.