Added support to PHP 5.2