Hello all,
I have been reading about how to get involved with the PHP documentation
team, and it pointed me to this list. I would like to become involved
in helping out the PHP documentation efforts. I looked at the TODO
list, and noticed that you guys wanted to have every function
documented. I looked into the list, and found one section in which I
believe I could do a pretty good job in contributing in, which was the
POSIX extension. I am pretty familiar with UNIX systems and wouldn't
mind improving the documentation for these functions to get my feet wet
in the documentation. I have attached a patch file for a handful of the
POSIX functions for review and feedback. If you want, I can also finish
up documenting the rest of the POSIX extension, and move onto other
undocumented functions.
Thanks,
Logan
### Eclipse Workspace Patch 1.0
#P PHPDoc
Index: en/reference/posix/functions/posix-getcwd.xml
===================================================================
RCS file: /repository/phpdoc/en/reference/posix/functions/posix-getcwd.xml,v
retrieving revision 1.8
diff -u -r1.8 posix-getcwd.xml
--- en/reference/posix/functions/posix-getcwd.xml 4 Feb 2007 02:47:57
-0000 1.8
+++ en/reference/posix/functions/posix-getcwd.xml 25 Apr 2007 08:22:26
-0000
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.8 $ -->
+<!-- $Revision: 1.9 $ -->
<refentry id="function.posix-getcwd">
<refnamediv>
<refname>posix_getcwd</refname>
@@ -14,13 +14,50 @@
</methodsynopsis>
<para>
Gets the absolute pathname of the script's current working directory.
+ On error, it sets errno which can be checked using
+ <function>posix_get_last_error</function>
</para>
</refsect1>
+ <refsect1 role="examples">
+ &reftitle.examples;
+ <para>
+ <example>
+ <title><function>posix_getcwd</function> example</title>
+ <para>
+ This example will return the absolute path of the current working
+ directory of the script.
+ </para>
+ <programlisting role="php">
+<![CDATA[
+#!/usr/local/bin/php
+<?php
+echo 'My current working directory is '.posix_getcwd();
+?>
+]]>
+ </programlisting>
+ </example>
+ </para>
+ </refsect1>
+
+ <refsect1 role="notes">
+ &reftitle.notes;
+ <para>
+ <function>posix_getcwd</function> can fail on
+ <simplelist>
+ <member>Read or search permission was denied</member>
+ <member>Pathname no longer exists</member>
+ </simplelist>
+ </para>
+
+ </refsect1>
+
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
- Returns the absolute pathname, or &false; on error.
+ Returns a <type>string</type> of the absolute pathname on success.
+ On error, returns &false; and sets errno which can be checked with
+ <function>posix_get_last_error</function>.
</para>
</refsect1>
f