<?php
echo php_uname()."\n";
echo PHP_OS."\n";
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
echo 'This is a server using Windows!';
} else {
echo 'This is a server not using Windows!'."\n";
}
?>
Sample Output:
Linux programming-editor 4.4.0-78-generic #99-Ubuntu SMP Thu Apr 27
15:29:09 UTC 2017 x86_64
Linux
This is a server not using Windows!
Sample Output:
need an explanation for this answer? contact us directly to get an explanation for this answer