PHP 5_4 needed modifications