Article of the week

installing PHPUnit

installing PHPUnit

18 Feb 2017 15:10:51


Automating PHPUnit installation process with a BASH script.


If you are any serious about writing code in PHP computer language you have tried some unit testing frameworks by now. Some of them are better than others, one that really stands out, both in terms of code quality and documentation is Sebastian's Bergmann PHPUnit. ...

Read full article »

Recent articles

Sorting objects by their property in PHP

10 Dec 2016 13:10:14

Sorting objects by their property in PHP

Lets say you have got an array of assorted objects, each with the same set of properties, which are either numbers or strings, and you would like to sort them by one of those properties using PHP. Since it is a fairly common requirement, you can expect the basic tools are ...

Read more »

Setting home and siteurl dynamically in Wordpress

10 Dec 2016 09:44:06

Setting home and siteurl dynamically in Wordpress

If for some reason you have set siteurl and / or home options wrong in your WordPress installation database and as a result can't access admin panel, or perhaps have a reason not to change these options in wp_options table, you can overwrite them either in wp_config.php or ...

Read more »

The most used Wordpress hooks

28 Nov 2016 20:53:05

The most used Wordpress hooks

Below is a list of the most often used hooks (sorted by the number of callbacks attached ) on a vanilla installation of WordPress (v.4.6.1) with twentysixteen theme loaded. On such a setup, in total I found 261 hooks, something was attached to. As seen in the list, the most ...

Read more »

Find total of a column of numbers with BASH

28 Nov 2016 20:53:05

Find total of a column of numbers with BASH

Suppose you have a file with a long list of items followed or perhaps preceded by whole numbers and you are asked to find the total of those numbers. The file might look like this (case 1): aaa:23 bb:2 ccc:98 . . . or perhaps like this (case ...

Read more »