SplFileObject::getMaxLineLen

(PHP 5 >= 5.1.0, PHP 7)
Get maximum line length
public int SplFileObject::getMaxLineLen ( void )

Gets the maximum line length as set by SplFileObject::setMaxLineLen().

Returns:

Returns the maximum line length if one has been set with SplFileObject::setMaxLineLen(), default is 0.

Examples:
SplFileObject::getMaxLineLen() example
<?php
$file = new SplFileObject("file.txt");
var_dump($file->getMaxLineLen());

$file->setMaxLineLen(20);
var_dump($file->getMaxLineLen());
?>

The above example will output something similar to:

int(0)
int(20)
doc_php
2016-02-24 16:20:20
Comments
Leave a Comment

Please login to continue.