reference/exec/functions/shell-exec.xml
7973fd533364af4dd6282ca9e7bee2dffec39b1c
...
...
@@ -1,7 +1,7 @@
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
3
<!-- splitted from ./en/functions/exec.xml, last change in rev 1.2 -->
4
-
<refentry xml:id='function.shell-exec' xmlns="http://docbook.org/ns/docbook">
4
+
<refentry xml:id="function.shell-exec" xmlns="http://docbook.org/ns/docbook">
5
5
<refnamediv>
6
6
<refname>shell_exec</refname>
7
7
<refpurpose>Execute command via shell and return the complete output as a string</refpurpose>
...
...
@@ -10,12 +10,11 @@
10
10
<refsect1 role="description">
11
11
&reftitle.description;
12
12
<methodsynopsis>
13
-
<type>string</type><methodname>shell_exec</methodname>
14
-
<methodparam><type>string</type><parameter>cmd</parameter></methodparam>
13
+
<type class="union"><type>string</type><type>false</type><type>null</type></type><methodname>shell_exec</methodname>
14
+
<methodparam><type>string</type><parameter>command</parameter></methodparam>
15
15
</methodsynopsis>
16
16
<para>
17
-
This function is identical to the <link
18
-
linkend="language.operators.execution">backtick operator</link>.
17
+
This function is identical to the <link linkend="language.operators.execution">backtick operator</link>.
19
18
</para>
20
19
<note>
21
20
<para>
...
...
@@ -31,7 +30,7 @@
31
30
<para>
32
31
<variablelist>
33
32
<varlistentry>
34
-
<term><parameter>cmd</parameter></term>
33
+
<term><parameter>command</parameter></term>
35
34
<listitem>
36
35
<para>
37
36
The command that will be executed.
...
...
@@ -45,8 +44,8 @@
45
44
<refsect1 role="returnvalues">
46
45
&reftitle.returnvalues;
47
46
<para>
48
-
The output from the executed command or &null; if an error occurred or the
49
-
command produces no output.
47
+
A &string; containing the output from the executed command, &false; if the pipe
48
+
cannot be established or &null; if an error occurs or the command produces no output.
50
49
</para>
51
50
<note>
52
51
<para>
...
...
@@ -58,6 +57,14 @@
58
57
</note>
59
58
</refsect1>
60
59

60
+
<refsect1 role="errors">
61
+
&reftitle.errors;
62
+
<para>
63
+
An <constant>E_WARNING</constant> level error is generated
64
+
when the pipe cannot be established.
65
+
</para>
66
+
</refsect1>
67
+

61
68
<refsect1 role="examples">
62
69
&reftitle.examples;
63
70
<para>
...
...
@@ -85,7 +92,6 @@ echo "<pre>$output</pre>";
85
92
</para>
86
93
</refsect1>
87
94
</refentry>
88
-

89
95
<!-- Keep this comment at the end of the file
90
96
Local variables:
91
97
mode: sgml
92
98