Source of: /manual/en/function.posix-uname.php
<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.posix.inc";
$setup = array (
'home' =>
array (
0 => 'index.php',
1 => 'PHP Manual',
),
'head' =>
array (
0 => 'UTF-8',
1 => 'en',
),
'this' =>
array (
0 => 'function.posix-uname.php',
1 => 'posix_uname',
),
'up' =>
array (
0 => 'ref.posix.php',
1 => 'POSIX Functions',
),
'prev' =>
array (
0 => 'function.posix-ttyname.php',
1 => 'posix_ttyname',
),
'next' =>
array (
0 => 'book.sem.php',
1 => 'Semaphore',
),
);
$setup["toc"] = $TOC;
$setup["parents"] = $PARENTS;
manual_setup($setup);
manual_header();
?>
<div id="function.posix-uname" class="refentry">
<div class="refnamediv">
<h1 class="refname">posix_uname</h1>
<p class="verinfo">(PHP 4, PHP 5)</p><p class="refpurpose"><span class="refname">posix_uname</span> — <span class="dc-title">Get system name</span></p>
</div>
<a name="function.posix-uname.description"></a><div class="refsect1 description">
<h3 class="title">Description</h3>
<div class="methodsynopsis dc-description">
<span class="type">array</span> <span class="methodname"><b>posix_uname</b></span>
( <span class="methodparam">void</span>
)</div>
<p class="para rdfs-comment">
Gets information about the system.
</p>
<p class="para">
Posix requires that assumptions must not be made about the
format of the values, e.g. the assumption that a release may contain
three digits or anything else returned by this function.
</p>
</div>
<a name="function.posix-uname.returnvalues"></a><div class="refsect1 returnvalues">
<h3 class="title">Return Values</h3>
<p class="para">
Returns a hash of strings with information about the
system. The indices of the hash are
</p><ul class="itemizedlist">
<li class="listitem"><span class="simpara">
sysname - operating system name (e.g. Linux)
</span></li>
<li class="listitem"><span class="simpara">
nodename - system name (e.g. valiant)
</span></li>
<li class="listitem"><span class="simpara">
release - operating system release (e.g. 2.2.10)
</span></li>
<li class="listitem"><span class="simpara">
version - operating system version (e.g. #4 Tue Jul 20
17:01:36 MEST 1999)
</span></li>
<li class="listitem"><span class="simpara">
machine - system architecture (e.g. i586)
</span></li>
<li class="listitem"><span class="simpara">
domainname - DNS domainname (e.g. example.com)
</span></li>
</ul><p>
</p>
<p class="para">
domainname is a GNU extension and not part of POSIX.1, so this
field is only available on GNU systems or when using the GNU
libc.
</p>
</div>
<a name="function.posix-uname.examples"></a><div class="refsect1 examples">
<h3 class="title">Examples</h3>
<p class="para">
</p><div class="example">
<p><b>Example #1 Example use of <b>posix_uname()</b></b></p>
<div class="example-contents programlisting">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB"><?php<br />$uname</span><span style="color: #007700">=</span><span style="color: #0000BB">posix_uname</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">$uname</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?></span>
</span>
</code></div>
</div>
<div class="example-contents para"><p>The above example will output
something similar to:</p></div>
<div class="example-contents screen">
<div class="cdata"><pre>
Array
(
[sysname] => Linux
[nodename] => funbox
[release] => 2.6.20-15-server
[version] => #2 SMP Sun Apr 15 07:41:34 UTC 2007
[machine] => i686
)
</pre></div>
</div>
</div><p>
</p>
</div>
</div><?php manual_footer(); ?>