jon Mon Sep 30 07:53:23 2002 EDT Added files: /phpdoc/en/reference/info/functions getopt.xml Log: Adding initial documentation for the new getopt() function.
Index: phpdoc/en/reference/info/functions/getopt.xml +++ phpdoc/en/reference/info/functions/getopt.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <refentry id="function.getopt"> <refnamediv> <refname>getopt</refname> <refpurpose>Gets options from the command line argument list</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>string</type><methodname>getopt</methodname> <methodparam><type>string</type><parameter>options</parameter></methodparam> </methodsynopsis> <para> Returns an associative array of option / argument pairs based on the options format specified in <parameter>options</parameter>, or &false; on an error. <informalexample> <programlisting> <![CDATA[ $options = getopt("f:hp:"); // parse the command line ($_GLOBALS['argv']) ]]> </programlisting> </informalexample> </para> <para> The <parameter>options</parameter> parameter may contain the following elements: individual characters, and characters followed by a colon to indicate an option argument is to follow. For example, an option string <literal>x</literal> recognizes an option <literal>-x</literal>, and an option string <literal>x:</literal> recognizes an option and argument <literal>-x argument</literal>. It does not matter if an argument has leading white space. </para> <para> This function will return an array of option / argument pairs. If an option does not have an argument, the value will be set to &null;. <note> <para> This function requires that the <link linkend="ini.register-argc-argv"> register_argc_argv</link> configuration option be enabled. </para> </note> </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php