Doc #67823 [Asn->Csd]: posix_* $fd documented as int, should be resource.

From: Date: Mon, 11 Aug 2014 23:08:23 +0000
Subject: Doc #67823 [Asn->Csd]: posix_* $fd documented as int, should be resource.
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-11428@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=67823&edit=1 ID: 67823 Updated by: aharvey@php.net Reported by: donatj at gmail dot com Summary: posix_* $fd documented as int, should be resource. -Status: Assigned +Status: Closed Type: Documentation Problem Package: POSIX related Operating System: N/A PHP Version: Irrelevant Assigned To: aharvey Block user comment: N Private report: N New Comment: 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 http://snaps.php.net/. For Windows: http://windows.php.net/snapshots/ Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2014-08-11 23:08:12] aharvey@php.net Automatic comment from SVN on behalf of aharvey Revision: http://svn.php.net/viewvc/?view=revision&revision=334543 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 22:58:37] aharvey@php.net 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 22:08:22] donatj at gmail dot com Description: ------------ 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* http://docs.php.net/manual/en/function.posix-isatty.php http://docs.php.net/manual/en/function.posix-ttyname.php http://us3.php.net/manual/en/function.fread.php Expected result: ---------------- resource Actual result: -------------- int ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=67823&edit=1

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