Skip to content
Snippets Groups Projects
Select Git revision
  • debian/latest default
  • upstream/latest
  • pristine-tar
  • debian/0.2.0-1
  • debian/0.1.0-1
  • upstream/0.1.0
  • upstream/0.2.0
  • v0.2.0
  • v0.1.0
9 results

README.md

Blame
  • user avatar
    Fan2Shrek authored and Pierre Ambroise committed
    09efce04
    History
    user avatar 09efce04

    PHP OS Helper

    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.