Skip to content

Commit 4cd2be9

Browse files
authored
Match fgetcsv parameter names to values in reflection
The documented parameters differ from the names exposed in reflection/source code. Now that named parameters are supported in PHP 8, this discrepancy is confusing and impactful. ``` $ php --rf fgetcsv Function [ <internal:standard> function fgetcsv ] { - Parameters [5] { Parameter #0 [ <required> $stream ] Parameter php#1 [ <optional> ?int $length = null ] Parameter php#2 [ <optional> string $separator = "," ] Parameter php#3 [ <optional> string $enclosure = "\"" ] Parameter php#4 [ <optional> string $escape = "\\" ] } - Return [ array|false ] } ```
1 parent 6a89105 commit 4cd2be9

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

reference/filesystem/functions/fgetcsv.xml

+6-6
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
&reftitle.description;
1111
<methodsynopsis>
1212
<type>array</type><methodname>fgetcsv</methodname>
13-
<methodparam><type>resource</type><parameter>handle</parameter></methodparam>
13+
<methodparam><type>resource</type><parameter>stream</parameter></methodparam>
1414
<methodparam choice="opt"><type>int</type><parameter>length</parameter><initializer>0</initializer></methodparam>
15-
<methodparam choice="opt"><type>string</type><parameter>delimiter</parameter><initializer>","</initializer></methodparam>
15+
<methodparam choice="opt"><type>string</type><parameter>separator</parameter><initializer>","</initializer></methodparam>
1616
<methodparam choice="opt"><type>string</type><parameter>enclosure</parameter><initializer>'"'</initializer></methodparam>
1717
<methodparam choice="opt"><type>string</type><parameter>escape</parameter><initializer>"\\"</initializer></methodparam>
1818
</methodsynopsis>
@@ -36,7 +36,7 @@
3636
<para>
3737
<variablelist>
3838
<varlistentry>
39-
<term><parameter>handle</parameter></term>
39+
<term><parameter>stream</parameter></term>
4040
<listitem>
4141
<para>
4242
A valid file pointer to a file successfully opened by
@@ -62,10 +62,10 @@
6262
</listitem>
6363
</varlistentry>
6464
<varlistentry>
65-
<term><parameter>delimiter</parameter></term>
65+
<term><parameter>separator</parameter></term>
6666
<listitem>
6767
<para>
68-
The optional <parameter>delimiter</parameter> parameter sets the field delimiter (one character only).
68+
The optional <parameter>separator</parameter> parameter sets the field separator (one character only).
6969
</para>
7070
</listitem>
7171
</varlistentry>
@@ -117,7 +117,7 @@
117117
&note.line-endings;
118118
<para>
119119
<function>fgetcsv</function> returns &null; if an invalid
120-
<parameter>handle</parameter> is supplied or &false; on other errors,
120+
<parameter>stream</parameter> is supplied or &false; on other errors,
121121
including end of file.
122122
</para>
123123
</refsect1>

0 commit comments

Comments
 (0)