Simply
echo PHP_OS;
It will print:
For Mac: Darwin
For Windows Visat: WinNT
For Ubuntu: Linux
Also if you want to know OS details about users accessing your site, you can use
$_SERVER[‘HTTP_USER_AGENT’]
learnings, photography, travel, adventures, passions, life etc...
Simply
echo PHP_OS;
It will print:
For Mac: Darwin
For Windows Visat: WinNT
For Ubuntu: Linux
Also if you want to know OS details about users accessing your site, you can use
$_SERVER[‘HTTP_USER_AGENT’]