PHP 4.0 Bug #9173: getline
| From: | amandato at unitedmcgill dot com | Date: | Thu, 08 Feb 2001 14:47:41 +0000 |
| Subject: | PHP 4.0 Bug #9173: getline | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-46027@lists.php.net to get a copy of this message | ||
From: amandato@unitedmcgill.com
Operating system: windowsNT
PHP version: 4.0.4pl1
PHP Bug Type: Feature/Change Request
Bug description: getline
Add a getline feature to the file and string routines. is it possible to incorporate the iostream
style stdin/stdout in php?
this is the getline i wrote:
function getline( $fp, $delim )
{
$result = "";
while( !feof( $fp ) )
{
$tmp = fgetc( $fp );
if( $tmp == $delim )
return $result;
$result .= $tmp;
}
return $result;
}
--
Edit Bug report at: http://bugs.php.net/?id=9173&edit=1