|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #67823 posix_* $fd documented as int, should be resource.
Submitted: 2014-08-11 22:08 UTC Modified: 2014-08-11 23:08 UTC
From: donatj at gmail dot com Assigned: aharvey (profile)
Status: Closed Package: POSIX related
PHP Version: Irrelevant OS: N/A
Private report: No CVE-ID: None
 [2014-08-11 22:08 UTC] donatj at gmail dot com
posix_isatty and posix_ttyname are documented as taking an int parameter, when more specifically they take a *resource*; namely STDOUT, STDERR, STDIN, etc. 

Methods such as fread and frwite which take similar resources document this as *resource* rather than int and I think its more correct to change the posix methods to being documented as *resource*

Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2014-08-11 22:58 UTC]
-Status: Open +Status: Assigned -Assigned To: +Assigned To: aharvey
 [2014-08-11 22:58 UTC]
Good catch. It's actually a little more complicated than that again — those two functions will accept both integers (in which case they're assumed to be file descriptors) and resources.

I'll fix that up.
 [2014-08-11 23:08 UTC]
Automatic comment from SVN on behalf of aharvey
Log: posix_isatty() and posix_ttyname() will accept both integers and resources.

Fixes doc bug #67823 (posix_* $fd documented as int, should be resource).
 [2014-08-11 23:08 UTC]
-Status: Assigned +Status: Closed
 [2014-08-11 23:08 UTC]
The fix for this bug has been committed.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at

 For Windows:
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Jul 27 00:01:25 2021 UTC