Collections functions
General functions
Render functions
Theme permission functions
Resource functions

tail()

Description

Tails a file using native PHP functions.

First introduced with system console.
Credit to:
http://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 3rd October 2022 11:35 Europe/London time based on the source file dated 15th September 2022 15:40 Europe/London time.