PHP Classes
elePHPant
Icontem

Apple OS X build: Return OS X version from build number

Recommend this page to a friend!
  Info   View files Documentation   View files View files (5)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2020-03-15 (1 hour ago) RSS 2.0 feedNot enough user ratingsTotal: 54 All time: 9,688 This week: 372Up
Version License PHP version Categories
apple-os-x-build 1.0Custom (specified...5PHP 5, Mac OS
Description Author

This class can return OS X version from build number.

It can take the build number string for a OS X release and returns the official version number.

The class can also return an array of all known OS X builds and version numbers.

  Performance   Level  
Name: Peter Kahl <contact>
Classes: 37 packages by
Country: United Kingdom United Kingdom
Innovation award
Innovation award
Nominee: 23x

Winner: 2x

 

Details

Apple OS X Build

Downloads Download per Month License If this project has business value for you then don't hesitate to support me with a small donation.

Associative array of OS X build and version codes that can be used in various ways. Uses fuzzy matching.

Usage

use peterkahl\OSXbuild\OSXbuild;

# Takes OS X build code and returns corresponding OS X version.
echo '16E195 ............ '. OSXbuild::getVersion('16E195') ."\n";
# Let's try build code that's not in our array:
echo '15A299 ............ '. OSXbuild::getVersion('15A299') ."\n";
/*
16E195 ............ 10.12.4
15A299 ............ 10.11
*/

# Are build/version data outdated? Older than 30 days:
if (OSXbuild::GetDataTimestamp() < time() - 30*86400) {
  echo 'OUTDATED';
  # Send email to admin to do something?
}

# Returns associative array of OS X versions.
$array = OSXbuild::getArray();

# Returns a randomly chosen OS X Calendar User Agent string.
echo OSXbuild::getCalendarUA(); # Mac+OS+X/10.12.2 (16C67) CalendarAgent/384

# Optionally, you can specify a minimum version of OS X (to get random User Agent string).
# Argument must be a string in format 'MAJOR.MINOR' (1 dot only.)
echo OSXbuild::getCalendarUA('10.10');

  Files folder image Files  
File Role Description
Files folder imagesrc (2 files)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  src  
File Role Description
  Accessible without login Plain text file data.php Aux. Auxiliary script
  Plain text file OSXbuild.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:54
This week:0
All time:9,688
This week:372Up
User Comments (1)
nice
2 years ago (muabshir)
70%StarStarStarStar