mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-24 04:48:55 +00:00
108 lines
3.1 KiB
XML
108 lines
3.1 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<refentry xml:id="function.stream-get-line" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>stream_get_line</refname>
|
|
<refpurpose>Gets line from stream resource up to a given delimiter</refpurpose>
|
|
</refnamediv>
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>string</type><methodname>stream_get_line</methodname>
|
|
<methodparam><type>resource</type><parameter>handle</parameter></methodparam>
|
|
<methodparam><type>int</type><parameter>length</parameter></methodparam>
|
|
<methodparam choice="opt"><type>string</type><parameter>ending</parameter><initializer>""</initializer></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Gets a line from the given handle.
|
|
</para>
|
|
<para>
|
|
Reading ends when <parameter>length</parameter> bytes have been read, when
|
|
the non-empty string specified by <parameter>ending</parameter> is found (which is
|
|
<emphasis>not</emphasis> included in the return value), or on <acronym>EOF</acronym>
|
|
(whichever comes first).
|
|
</para>
|
|
<para>
|
|
This function is nearly identical to <function>fgets</function> except in
|
|
that it allows end of line delimiters other than the standard \n, \r, and
|
|
\r\n, and does <emphasis>not</emphasis> return the delimiter itself.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>handle</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
A valid file handle.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>length</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
The maximum number of bytes to read from the handle.
|
|
Negative values are not supported.
|
|
Zero (<literal>0</literal>) means the default socket chunk size,
|
|
i.e. <literal>8192</literal> bytes.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>ending</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
An optional string delimiter.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Returns a string of up to <parameter>length</parameter> bytes read from the file
|
|
pointed to by <parameter>handle</parameter>.
|
|
</para>
|
|
<para>
|
|
If an error occurs, returns &false;.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<simplelist>
|
|
<member><function>fread</function></member>
|
|
<member><function>fgets</function></member>
|
|
<member><function>fgetc</function></member>
|
|
</simplelist>
|
|
</refsect1>
|
|
|
|
</refentry>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|