Compatibility with newer PHP versions