svn: /phpdoc/ja/trunk/reference/exec/functions/ exec.xml
[email protected] (Yoshinari Takaoka) Thu, 10 Dec 2020 00:57:15 +0000
| Newsgroups | php.doc.ja |
|---|---|
| Message-ID | <[email protected]> |
mumumu Thu, 10 Dec 2020 00:57:15 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=351986
Log:
Fix #80230: Doc for exec specifies & (reference) param, fails
Bug: https://bugs.php.net/80230 (Closed) Doc for exec specifies & (reference) param, fails
Changed paths:
U phpdoc/ja/trunk/reference/exec/functions/exec.xml
Modified: phpdoc/ja/trunk/reference/exec/functions/exec.xml
===================================================================
--- phpdoc/ja/trunk/reference/exec/functions/exec.xml 2020-12-10 00:52:49 UTC (rev 351985)
+++ phpdoc/ja/trunk/reference/exec/functions/exec.xml 2020-12-10 00:57:15 UTC (rev 351986)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 350871 Maintainer: hirokawa Status: ready -->
+<!-- EN-Revision: 351975 Maintainer: hirokawa Status: ready -->
<!-- CREDITS: shimooka,mumumu -->
<!-- splitted from ./en/functions/exec.xml, last change in rev 1.2 -->
<refentry xml:id="function.exec" xmlns="http://docbook.org/ns/docbook">
@@ -87,10 +87,24 @@
<?php
// ("whoami" コマンドをパスに有するシステム上で)
// 実行中のphp/httpdプロセスを所有するユーザーの名前を出力
-echo exec('whoami');
+$output=null;
+$retval=null;
+exec('whoami', $output, $retval);
+echo "Returned with status $retval and output:\n";
+print_r($output);
?>
]]>
</programlisting>
+ &example.outputs.similar;
+ <screen>
+<![CDATA[
+Returned with status 0 and output:
+Array
+(
+ [0] => cmb
+)
+]]>
+ </screen>
</example>
</para>
</refsect1>