From 340b3407218783e1145bbb1cb19bba13ae420913 Mon Sep 17 00:00:00 2001 From: Peter Cowburn Date: Sat, 6 Sep 2014 18:54:10 +0000 Subject: [PATCH] fleshed out SplFileObject::fread() a bit git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@334795 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/spl/splfileobject/fread.xml | 43 ++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/reference/spl/splfileobject/fread.xml b/reference/spl/splfileobject/fread.xml index 49c5c0917c..2e3da9896b 100644 --- a/reference/spl/splfileobject/fread.xml +++ b/reference/spl/splfileobject/fread.xml @@ -35,9 +35,50 @@ &reftitle.returnvalues; - The string read from the file. + Returns the string read from the file &return.falseforfailure;. + + + &reftitle.examples; + + + <methodname>SplFileObject::fread</methodname> example + +fread($file->getSize()); +?> +]]> + + + + + + + &reftitle.notes; + + + Note that SplFileObject::fread reads from the current + position of the file pointer. Use SplFileObject::ftell + to find the current position of the pointer and SplFileObject::rewind + (or SplFileObject::fseek) to rewind the pointer position. + + + + + + &reftitle.seealso; + + + fread + + + +