compatibility with PHP 5.0-5.3