file_get_contents length parameter (#590)

* Rename maxlen parameter to length
This commit is contained in:
Sergey Panteleev 2021-05-07 17:00:24 +03:00 committed by GitHub
parent f8476c9e0b
commit 6a7a96ccc6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,13 +14,13 @@
<methodparam choice="opt"><type>bool</type><parameter>use_include_path</parameter><initializer>&false;</initializer></methodparam>
<methodparam choice="opt"><type>resource</type><parameter>context</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>offset</parameter><initializer>0</initializer></methodparam>
<methodparam choice="opt"><type>int</type><parameter>maxlen</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>length</parameter></methodparam>
</methodsynopsis>
<para>
This function is similar to <function>file</function>, except that
<function>file_get_contents</function> returns the file in a
<type>string</type>, starting at the specified <parameter>offset</parameter>
up to <parameter>maxlen</parameter> bytes. On failure,
up to <parameter>length</parameter> bytes. On failure,
<function>file_get_contents</function> will return &false;.
</para>
<para>
@ -89,7 +89,7 @@
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>maxlen</parameter></term>
<term><parameter>length</parameter></term>
<listitem>
<para>
Maximum length of data read. The default is to read until end
@ -113,7 +113,7 @@
<refsect1 role="errors">
&reftitle.errors;
<para>
An <constant>E_WARNING</constant> level error is generated if <parameter>filename</parameter> cannot be found, <parameter>maxlength</parameter>
An <constant>E_WARNING</constant> level error is generated if <parameter>filename</parameter> cannot be found, <parameter>length</parameter>
is less than zero, or if seeking to the specified <parameter>offset</parameter> in the stream fails.
</para>
<para>