Describe current default of length (bug #36976)

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@210817 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Jakub Vrana 2006-04-05 16:20:04 +00:00
parent fbb9356ad5
commit 907a26ed5b

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.15 $ -->
<!-- $Revision: 1.16 $ -->
<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 -->
<refentry id="function.fgets">
<refnamediv>
@ -18,7 +18,8 @@
the file pointed to by <parameter>handle</parameter>. Reading ends when
<parameter>length</parameter> - 1 bytes have been read, on a newline (which is
included in the return value), or on EOF (whichever comes first). If no length
is specified, the length defaults to 1k, or 1024 bytes.
is specified, it will keep reading from the stream until it reaches
the end of the line.
</para>
<para>
If an error occurs, returns &false;.
@ -56,9 +57,7 @@ if ($handle) {
<note>
<simpara>
The <parameter>length</parameter> parameter became optional in PHP
4.2.0, if omitted, it would assume 1024 as the line length.
As of PHP 4.3, omitting <parameter>length</parameter> will keep
reading from the stream until it reaches the end of the line.
4.2.0. Until PHP 4.3.0, omitting it would assume 1024 as the line length.
If the majority of the lines in the file are all larger than 8KB,
it is more resource efficient for your script to specify the maximum
line length.