jolicode / php-os-helper
Helpers to detect the OS of the machine where PHP is running.
Installs: 778 429
Dependents: 3
Suggesters: 0
Security: 0
Stars: 12
Watchers: 5
Forks: 2
Open Issues: 0
Requires
- php: >=8.1
Requires (Dev)
- symfony/phpunit-bridge: ^6.3.1
README
This library provides some helpers to detect OS of the machine where PHP is running.
Installation
$ composer require jolicode/php-os-helper
Usage
<?php use JoliCode\PhpOsHelper\OsHelper; OsHelper::isUnix(); // true or false OsHelper::isWindows(); // true or false OsHelper::isWindowsSeven(); // true or false OsHelper::isWindowsEightOrHigher(); // true or false OsHelper::isWindowsSubsystemForLinux(); // true or false OsHelper::isMacOs(); // true or false OsHelper::isDocker(); // true or false OsHelper::getMacOSVersion(); // 10.15.7
Notes
This package contains helpers extracted from https://github.com/jolicode/JoliNotif to make them standalone.