Doc #81018 [Opn->Csd]: file_get_contents('file.txt', maxlen: 123);
| From: | sergey@php.net | Date: | Fri, 07 May 2021 14:02:13 +0000 |
| Subject: | Doc #81018 [Opn->Csd]: file_get_contents('file.txt', maxlen: 123); | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-18753@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=81018&edit=1
ID: 81018
Updated by: sergey@php.net
Reported by: saymongcsw at gmail dot com
Summary: file_get_contents('file.txt', maxlen: 123);
-Status: Open
+Status: Closed
Type: Documentation Problem
Package: Documentation problem
Operating System: N/A
PHP Version: 8.0.5
-Assigned To:
+Assigned To: sergey
Block user comment: N
Private report: N
New Comment:
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation better.
Applied with commit https://github.com/php/doc-en/commit/6a7a96ccc689ed202b81964f38d2360962cd70b2
Previous Comments:
------------------------------------------------------------------------
[2021-05-07 05:12:52] saymongcsw at gmail dot com
Description:
------------
file_get_contents ( string $filename , bool $use_include_path = false , resource $context = ? , int
$offset = 0 , int $maxlen = ? ) : string|false
Source: https://www.php.net/manual/en/function.file-get-contents.php
$maxlen is actually $length.
Test script:
---------------
<?php
try {
file_get_contents('php://input', length: 2000);
file_get_contents('php://input', maxlen: 2000);
} catch (Error $e) {
echo $e->getMessage();
}
Actual result:
--------------
Unknown named parameter $maxlen
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=81018&edit=1