downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

SplFileObject::fgetcsv> <SplFileObject::fflush
Last updated: Fri, 20 May 2011

view this page in

SplFileObject::fgetc

(PHP 5 >= 5.1.0)

SplFileObject::fgetcGets character from file

Descripción

public string SplFileObject::fgetc ( void )

Gets a character from the file.

Parámetros

Esta función no tiene parámetros.

Valores devueltos

Returns a string containing a single character read from the file or FALSE on EOF.

Warning

Esta función quizá devuelve Boolean FALSE, pero quizá también devuelve un valor non-Boolean que se evaluará como FALSE, como 0 o "". Por favor lea la sección en Booleans para más información. Use el operador === para testear el valor devuelto por esta función.

Ejemplos

Example #1 SplFileObject::fgetc() example

<?php
$file 
= new SplFileObject('file.txt');
while (
false !== ($char $file->fgetc())) {
    echo 
"$char\n";
}
?>

Ver también



add a note add a note User Contributed Notes SplFileObject::fgetc
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites