reference/filesystem/functions/file-put-contents.xml
ea62fb83196997032641b50fe44420305466195e
...
...
@@ -4,17 +4,17 @@
4
4
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.file-put-contents">
5
5
<refnamediv>
6
6
<refname>file_put_contents</refname>
7
-
<refpurpose>Write a string to a file</refpurpose>
7
+
<refpurpose>Write data to a file</refpurpose>
8
8
</refnamediv>
9
9

10
10
<refsect1 role="description">
11
11
&reftitle.description;
12
12
<methodsynopsis>
13
-
<type>int</type><methodname>file_put_contents</methodname>
13
+
<type class="union"><type>int</type><type>false</type></type><methodname>file_put_contents</methodname>
14
14
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
15
15
<methodparam><type>mixed</type><parameter>data</parameter></methodparam>
16
16
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer>0</initializer></methodparam>
17
-
<methodparam choice="opt"><type>resource</type><parameter>context</parameter></methodparam>
17
+
<methodparam choice="opt"><type class="union"><type>resource</type><type>null</type></type><parameter>context</parameter><initializer>&null;</initializer></methodparam>
18
18
</methodsynopsis>
19
19
<para>
20
20
This function is identical to calling <function>fopen</function>,
...
...
@@ -175,31 +175,6 @@ file_put_contents($file, $person, FILE_APPEND | LOCK_EX);
175
175
</para>
176
176
</refsect1>
177
177
178
-
<refsect1 role="changelog">
179
-
&reftitle.changelog;
180
-
<para>
181
-
<informaltable>
182
-
<tgroup cols="2">
183
-
<thead>
184
-
<row>
185
-
<entry>&Version;</entry>
186
-
<entry>&Description;</entry>
187
-
</row>
188
-
</thead>
189
-
<tbody>
190
-
<row>
191
-
<entry>5.1.0</entry>
192
-
<entry>
193
-
Added support for <constant>LOCK_EX</constant> and the ability to pass
194
-
a stream resource to the <parameter>data</parameter> parameter
195
-
</entry>
196
-
</row>
197
-
</tbody>
198
-
</tgroup>
199
-
</informaltable>
200
-
</para>
201
-
</refsect1>
202
-
203
178
<refsect1 role="notes">
204
179
&reftitle.notes;
205
180
&note.bin-safe;
206
181