略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: SplFileObject::getMaxLineLen

2024-03-29

SplFileObject::getMaxLineLen

(PHP 5 >= 5.1.0, PHP 7, PHP 8)

SplFileObject::getMaxLineLenGet maximum line length

说明

public SplFileObject::getMaxLineLen(): 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.

范例

示例 #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)

参见

add a noteadd a note

User Contributed Notes

There are no user contributed notes for this page.

官方地址:https://www.php.net/manual/en/splfileobject.getmaxlinelen.php

冷却塔厂家 广告
-- 广告
北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3