Doc #81067 [Opn->Ver]: fpassthru no false

From: Date: Fri, 21 May 2021 16:37:48 +0000
Subject: Doc #81067 [Opn->Ver]: fpassthru no false
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-18782@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=81067&edit=1 ID: 81067 Updated by: cmb@php.net Reported by: simbiat at outlook dot com Summary: fpassthru no false -Status: Open +Status: Verified Type: Documentation Problem -Package: phpdbg +Package: Filesystem function related PHP Version: 8.0.6 Block user comment: N Private report: N New Comment: Prior to PHP 8.0.0, fpassthru() returned false if a resource was passed which is not an open stream. As of PHP 8.0.0, a TypeError is thrown instead. Cf. <https://3v4l.org/gNerI>. Previous Comments: ------------------------------------------------------------------------ [2021-05-21 16:12:57] simbiat at outlook dot com Description: ------------ According to https://www.php.net/manual/en/function.fpassthru.php fpassthru can return false, even though definition is "fpassthru ( resource $stream ) : int". So, there is a contradiction and it seems like in description, rather in definition. Unless it's planned to replace Fatal Error with false return. Expected result: ---------------- Correct description of return values is expected Actual result: -------------- Promises false in case of error. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=81067&edit=1

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