dave Fri Aug 6 09:01:28 2004 EDT
Modified files:
/phpdoc/en/reference/info/functions php-uname.xml
Log:
- Completely redo php_uname(). Fixes #25186 too.
http://cvs.php.net/diff.php/phpdoc/en/reference/info/functions/php-uname.xml?r1=1.9&r2=1.10&ty=u
Index: phpdoc/en/reference/info/functions/php-uname.xml
diff -u phpdoc/en/reference/info/functions/php-uname.xml:1.9
phpdoc/en/reference/info/functions/php-uname.xml:1.10
--- phpdoc/en/reference/info/functions/php-uname.xml:1.9 Thu Jan 15 10:02:50
2004
+++ phpdoc/en/reference/info/functions/php-uname.xml Fri Aug 6 09:01:28 2004
@@ -1,25 +1,66 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.9 $ -->
+<!-- $Revision: 1.10 $ -->
<!-- splitted from ./en/functions/info.xml, last change in rev 1.7 -->
<refentry id="function.php-uname">
<refnamediv>
<refname>php_uname</refname>
<refpurpose>
- Returns information about the operating system PHP was built on
+ Returns information about the operating system PHP is running on
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>php_uname</methodname>
- <void/>
+ <methodparam
choice="opt"><type>string</type><parameter>mode</parameter></methodparam>
</methodsynopsis>
- <simpara>
- <function>php_uname</function> returns a <type>string</type> with a
- description of the operating system PHP is built on. If you're just
- wanting the name of the operating system, consider using the
- <constant>PHP_OS</constant> constant.
- </simpara>
+ <para>
+ <function>php_uname</function> returns a description of the operating
+ system PHP is running on. For the name of just the operating system,
+ consider using the <constant>PHP_OS</constant> constant, but be
+ reminded this constant will contain the operating system PHP was
+ <emphasis>built</emphasis> on.
+ </para>
+ <para>
+ On Unix, the output reverts to displaying the operating system
+ information PHP was built on if it cannot determine the currently
+ running OS.
+ </para>
+ <para>
+ <parameter>mode</parameter> defines what information is returned:
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ <literal>'a'</literal>: This is the default. Contains all modes in the
sequence <literal>"s n r v m"</literal>.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <literal>'s'</literal>: Operating system name. eg. <literal>FreeBSD</literal>.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <literal>'n'</literal>: Host name. eg.
<literal>localhost.example.com</literal>.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <literal>'r'</literal>: Release name. eg. <literal>5.1.2-RELEASE</literal>.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <literal>'v'</literal>: Version information. Varies a lot between operating
systems.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <literal>'m'</literal>: Machine type. eg. <literal>i386</literal>.
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </para>
<para>
<example>
<title>Some <function>php_uname</function> examples</title>