Task: Implement a PHP Tail Function
Task: Implement a PHP Tail Function: a task in Terminal-Lego-15k (Harbor dataset). Create a PHP function that efficiently reads the last N lines from a file, similar to the Unix tail command. This function should be suitable for reading from log files and must be memory-efficient (it should NOT…
The task
Create a PHP function that efficiently reads the last N lines from a file, similar to the Unix `tail` command. This function should be suitable for reading from log files and must be memory-efficient (it should NOT read the entire file into memory).
Part of PrimeIntellect/Terminal-Lego-15k.