Dutch PHP Conference 2025 - Call For Papers

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 note

User Contributed Notes

There are no user contributed notes for this page.
To Top