Created
August 21, 2020 17:02
-
-
Save Cvar1984/428d1b7031f4e5f134a7dd5f8b24076b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Class: Info | |
| * | |
| */ | |
| class Info | |
| { | |
| /** | |
| * getPhpVersion | |
| * @return string | |
| * | |
| */ | |
| public static function getPhpVersion() | |
| { | |
| return PHP_VERSION; | |
| } | |
| /** | |
| * getServerInfo | |
| * @return string | |
| * | |
| */ | |
| public static function getServerInfo() | |
| { | |
| return php_uname(); | |
| } | |
| /** | |
| * getPhpDeclaredClasses | |
| * @return array | |
| * | |
| */ | |
| public static function getPhpDeclaredClasses() | |
| { | |
| return get_declared_classes(); | |
| } | |
| /** | |
| * getPhpIncludedModules | |
| * @return array | |
| * | |
| */ | |
| public static function getPhpIncludedModules() | |
| { | |
| return get_loaded_extensions(); | |
| } | |
| /** | |
| * getPhpExtensionDir | |
| * @return string | |
| * | |
| */ | |
| public static function getPhpExtensionDir() | |
| { | |
| return PHP_EXTENSION_DIR; | |
| } | |
| /** | |
| * isPhpZts | |
| * @return bool | |
| * | |
| */ | |
| public static function isPhpZts() | |
| { | |
| return (bool)PHP_ZTS; | |
| } | |
| } | |
| var_dump(Info::getPhpExtensionDir(), Info::isPhpZts()); | |
| /* https://www.php.net/manual/en/reserved.constants.php */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment