Collections functions
General functions
Node functions
Render functions
Theme permission functions
User functions
Resource functions

tail()

Description

Tails a file using native PHP functions.

First introduced with system console.
Credit to:
https://www.geekality.net/2011/05/28/php-tail-tackling-large-files

As of 2020-06-29 the website is showing that all contents/code are CC BY 3.0
https://creativecommons.org/licenses/by/3.0/

Example:
tail($file_path, 10, 4096, [
'name' => 'resourcespace.tail_search',
'params' => ['search_terms' => ['term1', 'term2']]
]);

represent the filter name and its params.

Parameters

ColumnTypeDefaultDescription
$filename string
$lines integer 10
$buffer integer 4096
$filters array [] List of stream filters. Each value is an array containing the "name" and "params" keys. These

Return

string

This article was last updated 24th May 2023 09:05 Europe/London time based on the source file dated 19th May 2023 16:40 Europe/London time.