reference/stream/functions/stream-get-line.xml
c3067ab0a7f55632c87da73368fd3c739e110a57
...
...
@@ -8,17 +8,17 @@
8
8
<refsect1 role="description">
9
9
&reftitle.description;
10
10
<methodsynopsis>
11
-
<type>string</type><methodname>stream_get_line</methodname>
12
-
<methodparam><type>resource</type><parameter>handle</parameter></methodparam>
11
+
<type class="union"><type>string</type><type>false</type></type><methodname>stream_get_line</methodname>
12
+
<methodparam><type>resource</type><parameter>stream</parameter></methodparam>
13
13
<methodparam><type>int</type><parameter>length</parameter></methodparam>
14
-
<methodparam choice="opt"><type>string</type><parameter>ending</parameter></methodparam>
14
+
<methodparam choice="opt"><type>string</type><parameter>ending</parameter><initializer>""</initializer></methodparam>
15
15
</methodsynopsis>
16
16
<para>
17
17
Gets a line from the given handle.
18
18
</para>
19
19
<para>
20
20
Reading ends when <parameter>length</parameter> bytes have been read, when
21
-
the string specified by <parameter>ending</parameter> is found (which is
21
+
the non-empty string specified by <parameter>ending</parameter> is found (which is
22
22
<emphasis>not</emphasis> included in the return value), or on <acronym>EOF</acronym>
23
23
(whichever comes first).
24
24
</para>
...
...
@@ -34,7 +34,7 @@
34
34
<para>
35
35
<variablelist>
36
36
<varlistentry>
37
-
<term><parameter>handle</parameter></term>
37
+
<term><parameter>stream</parameter></term>
38
38
<listitem>
39
39
<para>
40
40
A valid file handle.
...
...
@@ -45,7 +45,10 @@
45
45
<term><parameter>length</parameter></term>
46
46
<listitem>
47
47
<para>
48
-
The number of bytes to read from the handle.
48
+
The maximum number of bytes to read from the handle.
49
+
Negative values are not supported.
50
+
Zero (<literal>0</literal>) means the default socket chunk size,
51
+
i.e. <literal>8192</literal> bytes.
49
52
</para>
50
53
</listitem>
51
54
</varlistentry>
...
...
@@ -65,10 +68,7 @@
65
68
&reftitle.returnvalues;
66
69
<para>
67
70
Returns a string of up to <parameter>length</parameter> bytes read from the file
68
-
pointed to by <parameter>handle</parameter>.
69
-
</para>
70
-
<para>
71
-
If an error occurs, returns &false;.
71
+
pointed to by <parameter>stream</parameter>,&return.falseforfailure;.
72
72
</para>
73
73
</refsect1>
74
74
...
...
@@ -82,7 +82,6 @@
82
82
</refsect1>
83
83

84
84
</refentry>
85
-

86
85
<!-- Keep this comment at the end of the file
87
86
Local variables:
88
87
mode: sgml
89
88