Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions reference/filesystem/functions/fgetcsv.xml
Original file line number Diff line number Diff line change
Expand Up @@ -88,18 +88,17 @@
It must be a single byte character or the empty string.
The empty string (<literal>""</literal>) disables the proprietary escape mechanism.
</para>
<note>
<warning>
<simpara>
Usually an <parameter>enclosure</parameter> character is escaped inside
a field by doubling it; however, the <parameter>escape</parameter>
character can be used as an alternative. So for the default parameter
values <literal>""</literal> and <literal>\"</literal> have the same
meaning. Other than allowing to escape the
<parameter>enclosure</parameter> character the
<parameter>escape</parameter> character has no special meaning; it isn't
even meant to escape itself.
Inside an <parameter>enclosure</parameter>, the <parameter>enclosure</parameter> character can always be <parameter>escaped</parameter> by doubling it,
resulting in a single <parameter>enclosure</parameter> character in the parsed result.
The <parameter>escaped</parameter> character works differently:
If it is followed by an <parameter>enclosure</parameter> character then that <parameter>enclosure</parameter> character will not be treated as one,
however the <parameter>escaped</parameter> character itself remains. So for the default parameters, <literal>""</literal>
inside an <parameter>enclosure</parameter> will be parsed into <literal>",</literal> while <literal>\"</literal> inside an
<parameter>enclosure</parameter> will be parsed into <literal>\"</literal>.
</simpara>
</note>
</warning>
<warning>
<simpara>
As of PHP 8.4.0, depending on the default value of
Expand Down
19 changes: 9 additions & 10 deletions reference/spl/splfileobject/fgetcsv.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,17 @@
<methodname>SplFileObject::setCsvControl</methodname>.
An empty string (<literal>""</literal>) disables the proprietary escape mechanism.
</para>
<note>
<warning>
<simpara>
Usually an <parameter>enclosure</parameter> character is escaped inside
a field by doubling it; however, the <parameter>escape</parameter>
character can be used as an alternative. So for the default parameter
values <literal>""</literal> and <literal>\"</literal> have the same
meaning. Other than allowing to escape the
<parameter>enclosure</parameter> character the
<parameter>escape</parameter> character has no special meaning; it isn't
even meant to escape itself.
Inside an <parameter>enclosure</parameter>, the <parameter>enclosure</parameter> character can always be <parameter>escaped</parameter> by doubling it,
resulting in a single <parameter>enclosure</parameter> character in the parsed result.
The <parameter>escaped</parameter> character works differently:
If it is followed by an <parameter>enclosure</parameter> character then that <parameter>enclosure</parameter> character will not be treated as one,
however the <parameter>escaped</parameter> character itself remains. So for the default parameters, <literal>""</literal>
inside an <parameter>enclosure</parameter> will be parsed into <literal>",</literal> while <literal>\"</literal> inside an
<parameter>enclosure</parameter> will be parsed into <literal>\"</literal>.
</simpara>
</note>
</warning>
<warning>
<simpara>
As of PHP 8.4.0, depending on the default value of
Expand Down