|
1 | 1 | <?xml version="1.0" encoding="utf-8"?>
|
2 | 2 | <!-- $Revision$ -->
|
3 |
| -<refentry xml:id="splfileobject.fgetcsv" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> |
| 3 | +<refentry xml:id="splfileobject.fgetcsv" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude"> |
4 | 4 | <refnamediv>
|
5 | 5 | <refname>SplFileObject::fgetcsv</refname>
|
6 | 6 | <refpurpose>Gets line from file and parse as CSV fields</refpurpose>
|
|
17 | 17 | <para>
|
18 | 18 | Gets a line from the file which is in <acronym>CSV</acronym> format and returns an array containing the fields read.
|
19 | 19 | </para>
|
20 |
| - <note> |
21 |
| - <para> |
22 |
| - The locale settings are taken into account by this function. If |
23 |
| - <constant>LC_CTYPE</constant> is e.g. <literal>en_US.UTF-8</literal>, files in |
24 |
| - one-byte encodings may be read wrongly by this function. |
25 |
| - </para> |
26 |
| - </note> |
| 20 | + <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('function.fgetcsv')/db:refsect1[@role='description']//db:note/.)"> |
| 21 | + <xi:fallback/> |
| 22 | + </xi:include> |
27 | 23 | </refsect1>
|
28 | 24 |
|
29 | 25 | <refsect1 role="parameters">
|
|
34 | 30 | <term><parameter>separator</parameter></term>
|
35 | 31 | <listitem>
|
36 | 32 | <para>
|
37 |
| - The field delimiter (one single-byte character only). Defaults as a comma or the value set using <methodname>SplFileObject::setCsvControl</methodname>. |
| 33 | + The field delimiter (one single-byte character only). |
| 34 | + By default <literal>,</literal> or the value set by a prior call to |
| 35 | + <methodname>SplFileObject::setCsvControl</methodname>. |
38 | 36 | </para>
|
39 | 37 | </listitem>
|
40 | 38 | </varlistentry>
|
41 | 39 | <varlistentry>
|
42 | 40 | <term><parameter>enclosure</parameter></term>
|
43 | 41 | <listitem>
|
44 | 42 | <para>
|
45 |
| - The field enclosure character (one single-byte character only). Defaults as a double quotation mark or the value set using <methodname>SplFileObject::setCsvControl</methodname>. |
| 43 | + The field enclosure character (one single-byte character only). |
| 44 | + By default <literal>"</literal> or the value set by a prior call to |
| 45 | + <methodname>SplFileObject::setCsvControl</methodname>. |
46 | 46 | </para>
|
47 | 47 | </listitem>
|
48 | 48 | </varlistentry>
|
49 | 49 | <varlistentry>
|
50 | 50 | <term><parameter>escape</parameter></term>
|
51 | 51 | <listitem>
|
52 | 52 | <para>
|
53 |
| - The escape character (at most one single-byte character). Defaults as a backslash (<literal>\</literal>) or the value set using <methodname>SplFileObject::setCsvControl</methodname>. |
| 53 | + The escape character (at most one single-byte character). |
| 54 | + The field enclosure character (one single-byte character only). |
| 55 | + By default <literal>\</literal> or the value set by a prior call to |
| 56 | + <methodname>SplFileObject::setCsvControl</methodname>. |
54 | 57 | An empty string (<literal>""</literal>) disables the proprietary escape mechanism.
|
55 | 58 | </para>
|
56 | 59 | <note>
|
|
65 | 68 | even meant to escape itself.
|
66 | 69 | </simpara>
|
67 | 70 | </note>
|
| 71 | + <warning> |
| 72 | + <simpara> |
| 73 | + As of PHP 8.4.0, depending on the default value of |
| 74 | + <parameter>escape</parameter> is deprecated. |
| 75 | + It needs to be provided explicitly either positionally or by the use |
| 76 | + of <link linkend="functions.named-arguments">Named Arguments</link>, |
| 77 | + or by a call to <methodname>SplFileObject::setCsvControl</methodname>. |
| 78 | + </simpara> |
| 79 | + </warning> |
68 | 80 | </listitem>
|
69 | 81 | </varlistentry>
|
70 | 82 | </variablelist>
|
|
86 | 98 | </note>
|
87 | 99 | </refsect1>
|
88 | 100 |
|
| 101 | + <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('function.fgetcsv')/db:refsect1[@role='errors']/.)"> |
| 102 | + <xi:fallback/> |
| 103 | + </xi:include> |
| 104 | + |
89 | 105 | <refsect1 role="changelog">
|
90 | 106 | &reftitle.changelog;
|
91 | 107 | <para>
|
|
98 | 114 | </row>
|
99 | 115 | </thead>
|
100 | 116 | <tbody>
|
| 117 | + <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('function.fgetcsv')/db:refsect1[@role='changelog']//db:row[db:entry[text()='8.4.0']]/.)"> |
| 118 | + <xi:fallback/> |
| 119 | + </xi:include> |
101 | 120 | <row>
|
102 | 121 | <entry>7.4.0</entry>
|
103 | 122 | <entry>
|
@@ -169,14 +188,17 @@ A salmon is a fish with 0 legs
|
169 | 188 |
|
170 | 189 | <refsect1 role="seealso">
|
171 | 190 | &reftitle.seealso;
|
172 |
| - <para> |
173 |
| - <simplelist> |
174 |
| - <member><methodname>SplFileObject::setCsvControl</methodname></member> |
175 |
| - <member><methodname>SplFileObject::setFlags</methodname></member> |
176 |
| - <member><link linkend="splfileobject.constants.read-csv">SplFileObject::READ_CSV</link></member> |
177 |
| - <member><methodname>SplFileObject::current</methodname></member> |
178 |
| - </simplelist> |
179 |
| - </para> |
| 191 | + <simplelist> |
| 192 | + <member><methodname>SplFileObject::fputcsv</methodname></member> |
| 193 | + <member><methodname>SplFileObject::setCsvControl</methodname></member> |
| 194 | + <member><methodname>SplFileObject::getCsvControl</methodname></member> |
| 195 | + <member><methodname>SplFileObject::setFlags</methodname></member> |
| 196 | + <member><constant>SplFileObject::READ_CSV</constant></member> |
| 197 | + <member><methodname>SplFileObject::current</methodname></member> |
| 198 | + <member><function>fputcsv</function></member> |
| 199 | + <member><function>fgetcsv</function></member> |
| 200 | + <member><function>str_getcsv</function></member> |
| 201 | + </simplelist> |
180 | 202 | </refsect1>
|
181 | 203 |
|
182 | 204 | </refentry>
|
|
0 commit comments