[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-doc-cvs
Subject:    [DOC-CVS] =?utf-8?q?svn:_/phpdoc/en/trunk/reference/info/functions/_cli-get-process-title.xml?=
From:       Sherif_Ramadan <googleguy () php ! net>
Date:       2013-06-26 7:16:37
Message-ID: svn-googleguy-1372230997-330660-991370272 () svn ! php ! net
[Download RAW message or body]

googleguy                                Wed, 26 Jun 2013 07:16:37 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=330660

Log:
Adding example for function usage.

Changed paths:
    U   phpdoc/en/trunk/reference/info/functions/cli-get-process-title.xml

Modified: phpdoc/en/trunk/reference/info/functions/cli-get-process-title.xml
===================================================================
--- phpdoc/en/trunk/reference/info/functions/cli-get-process-title.xml	2013-06-26 \
                04:55:11 UTC (rev 330659)
+++ phpdoc/en/trunk/reference/info/functions/cli-get-process-title.xml	2013-06-26 \
07:16:37 UTC (rev 330660) @@ -48,6 +48,31 @@
   </para>
  </refsect1>

+ <refsect1 role="examples">
+  &reftitle.examples;
+  <para>
+   <example>
+    <title><function>cli_get_process_title</function> example</title>
+    <programlisting role="php">
+<![CDATA[
+<?php
+$title = "My Amazing PHP Script";
+$pid = getmypid(); // you can use this to see your process title in ps
+
+if (!cli_set_process_title($title)) {
+    echo "Unable to set process title for PID $pid...\n";
+    exit(1);
+} else {
+    echo "The process title '$title' for PID $pid has been set for your process!\n";
+    sleep(5);
+}
+?>
+]]>
+    </programlisting>
+   </example>
+  </para>
+ </refsect1>
+
  <refsect1 role="seealso">
   &reftitle.seealso;
   <para>



-- 
PHP Documentation Commits Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic