substitute function call for PHP 5.4