better support for later PHP versions