Updated from JHtest project. PHP 5.2