SplFileObject::getMaxLineLen

(PHP 5 >= 5.1.0, PHP 7)

SplFileObject::getMaxLineLenGet maximum line length

说锟斤拷

public SplFileObject::getMaxLineLen ( void ) : int

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

锟斤拷锟斤拷

锟剿猴拷锟斤拷没锟叫诧拷锟斤拷锟斤拷

锟斤拷锟斤拷值

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

锟斤拷锟斤拷

Example #1 SplFileObject::getMaxLineLen() example

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

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

锟斤拷锟斤拷锟斤拷锟教碉拷锟斤拷锟斤拷锟斤拷锟斤拷冢锟�

int(0)
int(20)

锟轿硷拷

  • Classname::Method()