PHP Classes

PHP OS Class: Determine the server operating system type

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 104 All time: 9,745 This week: 258Up
Version License PHP version Categories
php-os-class 1.0MIT/X Consortium ...5PHP 5
Description 

Author

This is a simple class that can determine the server operating system type.

It looks at the PHP_OS_FAMILY environment variable and parses it to determine what operating system the server on which PHP is running.

Currently it can determine if the operating system type is of Windows, BSD, Linux and Solaris.

Picture of Muhammad Umer Farooq
Name: Muhammad Umer Farooq is available for providing paid consulting. Contact Muhammad Umer Farooq .
Classes: 52 packages by
Country: Pakistan Pakistan
Age: 23
All time rank: 84310 in Pakistan Pakistan
Week rank: 216 Up5 in Pakistan Pakistan Up
Innovation award
Innovation award
Nominee: 6x

Example

<?php

require_once 'classes/OperatingSystem.php';

$os = new OperatingSystem();
echo
$os->get();


Details

PHP-OperatingSystem-Class

php OperatingSystem class

Feature

This class return the operating system of php server (where php is installed)


  Files folder image Files (3)  
File Role Description
Files folder imageclasses (1 file)
Accessible without login Plain text file index.php Example Example script
Accessible without login Plain text file readme.md Data Auxiliary data

  Files folder image Files (3)  /  classes  
File Role Description
  Plain text file OperatingSystem.php Class Class source

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:104
This week:0
All time:9,745
This week:258Up