$module = 'my_package_module'; $displayName = php_version_compare('7.4.0') ? \Module::getDisplayName($module) : \PackageManager::getModuleDisplayName($module); echo $displayName;In this example, we are getting the display name of a package module called `my_package_module`. We are using the `php_version_compare` function to check if the current PHP version is `7.4.0` or greater. If it is, we use the newer `Module` class to get the display name. If not, we use the older `PackageManager` class. Package library: This example uses the Joomla! CMS package library, as it is the library that provides the `Module` and `PackageManager` classes.