php_uname 


php128 apg

RETURNS information about the operating system where PHP is running.





The STRING returned by this function is the same viewed at the very top of the phpinfo output.

If you want to use the name of the operating system in use, you should consider using the PHP_OS constant, but keep in mind this constant will contain the operating system PHP was built on.

On some UNIX systems this function may fail because php_uname library call either doesn't exist or doesn't work.



<?php

str php_uname 
str $mode "a" )


where,

$mode Single character that defines 
                           the returned information
                           
SEE the below TABLE )

?>

  $mode   

NAME MODE
a This is the default.
Contains all modes in the sequence "s n r v m".
s Operating system name
n Host name
r Release name
v Version information.
Varies a lot between operating systems
m Machine type
ed48


  1 EXERCISE   

<?php

echo php_uname('a'); 
        
?>


  2 EXERCISE   

<?php

echo php_uname('rvm'); 
        
?>