php教程

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()

User Contributed Notes

There are no user contributed notes for this page.

CopyRight © 2008-2022 verySource.Com All Rights reserved. 京ICP备17048824号-1 京公网安备:11010502034788