reference/filesystem/functions/file-get-contents.xml
3abd17e61d5022d503604cc06894254e3281acf5
...
...
@@ -12,9 +12,9 @@
12
12
<type class="union"><type>string</type><type>false</type></type><methodname>file_get_contents</methodname>
13
13
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
14
14
<methodparam choice="opt"><type>bool</type><parameter>use_include_path</parameter><initializer>&false;</initializer></methodparam>
15
-
<methodparam choice="opt"><type>resource</type><parameter>context</parameter></methodparam>
15
+
<methodparam choice="opt"><type class="union"><type>resource</type><type>null</type></type><parameter>context</parameter><initializer>&null;</initializer></methodparam>
16
16
<methodparam choice="opt"><type>int</type><parameter>offset</parameter><initializer>0</initializer></methodparam>
17
-
<methodparam choice="opt"><type>int</type><parameter>length</parameter></methodparam>
17
+
<methodparam choice="opt"><type class="union"><type>int</type><type>null</type></type><parameter>length</parameter><initializer>&null;</initializer></methodparam>
18
18
</methodsynopsis>
19
19
<para>
20
20
This function is similar to <function>file</function>, except that
...
...
@@ -135,6 +135,12 @@
135
135
</row>
136
136
</thead>
137
137
<tbody>
138
+
<row>
139
+
<entry>8.0.0</entry>
140
+
<entry>
141
+
<parameter>length</parameter> is nullable now.
142
+
</entry>
143
+
</row>
138
144
<row>
139
145
<entry>7.1.0</entry>
140
146
<entry>
...
...
@@ -198,13 +204,13 @@ string(14) "lle Bjori Ro"
198
204
<![CDATA[
199
205
<?php
200
206
// Create a stream
201
-
$opts = array(
202
-
'http'=>array(
203
-
'method'=>"GET",
204
-
'header'=>"Accept-language: en\r\n" .
205
-
"Cookie: foo=bar\r\n"
206
-
)
207
-
);
207
+
$opts = [
208
+
'http' => [
209
+
'method' => "GET",
210
+
'header' => "Accept-language: en\r\n" .
211
+
"Cookie: foo=bar",
212
+
]
213
+
];
208
214

209
215
$context = stream_context_create($opts);
210
216

211
217