Doc #81018 [NEW]: file_get_contents('file.txt', maxlen: 123);

From: Date: Fri, 07 May 2021 05:12:52 +0000
Subject: Doc #81018 [NEW]: file_get_contents('file.txt', maxlen: 123);
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-18752@lists.php.net to get a copy of this message
From:             saymongcsw at gmail dot com
Operating system: N/A
PHP version:      8.0.5
Package:          Documentation problem
Bug Type:         Documentation Problem
Bug description:file_get_contents('file.txt', maxlen: 123);

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 bug report at https://bugs.php.net/bug.php?id=81018&edit=1
-- 
Fix committed:                    https://bugs.php.net/fix.php?id=81018&r=fixed
Fixed in release:                 https://bugs.php.net/fix.php?id=81018&r=alreadyfixed
Need backtrace:                   https://bugs.php.net/fix.php?id=81018&r=needtrace
Need Reproduce Script:            https://bugs.php.net/fix.php?id=81018&r=needscript
Try newer version:                https://bugs.php.net/fix.php?id=81018&r=oldversion
Not developer issue:              https://bugs.php.net/fix.php?id=81018&r=support
Expected behavior:                https://bugs.php.net/fix.php?id=81018&r=notwrong
Not enough info:                  https://bugs.php.net/fix.php?id=81018&r=notenoughinfo
Submitted twice:                  https://bugs.php.net/fix.php?id=81018&r=submittedtwice
register_globals:                 https://bugs.php.net/fix.php?id=81018&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=81018&r=phptooold
Daylight Savings:                 https://bugs.php.net/fix.php?id=81018&r=dst
IIS Stability:                    https://bugs.php.net/fix.php?id=81018&r=isapi
Install GNU Sed:                  https://bugs.php.net/fix.php?id=81018&r=gnused
Floating point limitations:       https://bugs.php.net/fix.php?id=81018&r=float
No Zend Extensions:               https://bugs.php.net/fix.php?id=81018&r=nozend
MySQL Configuration Error:        https://bugs.php.net/fix.php?id=81018&r=mysqlcfg


Thread (2 messages)

« previous php.doc.bugs (#18752) next »