PHP SplFileObject getMaxLineLen () function

PHP

Syntax:
int SplFileObject::getMaxLineLen (void)
Parameters:this function takes no parameters.Return Values:This function returns the maximum length of a string. The default is 0.The following programs illustrate the SplFileObject::getMaxLineLen() function in PHP:Program 1:  
// Create SplFile object $file = new SplFileObject ( " gfg.txt " );  
// Print length var_dump ( $file -> getMaxLineLen());  
// Create a SplFile object $file = new SplFileObject ( __ FILE__ );  
// Print length var_dump ( $file -> getMaxLineLen());  
?>
Output:
int (0) int (0)
Program 2:  
// Create SplFile object $gfg = new SplFileObject ( "gfg.txt" );  
// Print length var_dump ( $gfg -> getMaxLineLen());  
// Set length $gfg -> setMaxLineLen (20); var_dump ( $gfg -> getMaxLineLen());  
?>
Exit:
int (0 ) int (20)
Link: http://php.net /manual/en/splfileobject.getmaxlinelen.php