PHP code example of compwright / php-os-release
1. Go to this page and download the library: Download compwright/php-os-release library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
compwright / php-os-release example snippets
use CompWright\PhpOsRelease\OsReleaseReader;
$reader = new OsReleaseReader();
$osRelease = $reader();
// Access via property or array access
$version = $osRelease->version;
// or:
$version = $osRelease['VERSION'];