|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #81067 fpassthru no false
Submitted: 2021-05-21 16:12 UTC Modified: 2021-05-21 16:37 UTC
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: simbiat at outlook dot com Assigned:
Status: Closed Package: Filesystem function related
PHP Version: 8.0.6 OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: simbiat at outlook dot com
New email:
PHP Version: OS:


 [2021-05-21 16:12 UTC] simbiat at outlook dot com
According to 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.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2021-05-21 16:37 UTC]
-Status: Open +Status: Verified -Package: phpdbg +Package: Filesystem function related
 [2021-05-21 16:37 UTC]
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. <>.
 [2021-05-22 19:43 UTC] simbiat at outlook dot com
That's fine, but this needs to be reflected in the manual.
 [2021-05-25 08:24 UTC]
Automatic comment on behalf of saundefined (author) and web-flow (committer)
Log: fpassthru error description (#628)
 [2021-05-25 08:24 UTC]
-Status: Verified +Status: Closed
 [2021-05-25 10:58 UTC]
Automatic comment on behalf of mumumu
Log: fpassthru error description (php/doc-en#628)
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sat Jan 28 16:03:58 2023 UTC