nicobn Thu Aug 16 19:40:36 2007 UTC
Modified files: /phpdoc/en/reference/sockets/functions socket-get-option.xml Log: Added example http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/sockets/functions/socket-get-option.xml?r1=1.13&r2=1.14&diff_format=u Index: phpdoc/en/reference/sockets/functions/socket-get-option.xml diff -u phpdoc/en/reference/sockets/functions/socket-get-option.xml:1.13 phpdoc/en/reference/sockets/functions/socket-get-option.xml:1.14 --- phpdoc/en/reference/sockets/functions/socket-get-option.xml:1.13 Thu Aug 16 19:30:16 2007 +++ phpdoc/en/reference/sockets/functions/socket-get-option.xml Thu Aug 16 19:40:36 2007 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.13 $ --> +<!-- $Revision: 1.14 $ --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-get-option"> <refnamediv> <refname>socket_get_option</refname> @@ -247,6 +247,27 @@ </para> </refsect1> + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title><function>socket_set_option</function> example</title> + <programlisting role="php"> +<![CDATA[ +<?php +$socket = socket_create_listen(1223); + +$linger = array('l_linger' => 1, 'l_onoff' => 1); +socket_set_option($socket, SOL_SOCKET, SO_LINGER, $linger); + +var_dump(socket_get_option($socket, SOL_SOCKET, SO_REUSEADDR)); +?> +]]> + </programlisting> + </example> + </para> + </refsect1> + <refsect1 role="changelog"> &reftitle.changelog; <para>