nicodemuz/php-tail-f 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

nicodemuz/php-tail-f

最新稳定版本:v1.0.0

Composer 安装命令:

composer require nicodemuz/php-tail-f

包简介

A simple implementation to provide tail -f functionality in PHP code. Allows you to monitor newly added lines to a given file.

README 文档

README

A simple implementation to provide "tail -f" functionality in PHP code. Allows you to monitor newly added lines to a given file.

Works cross-platform on both unix and Windows.

This class is designed for implementation within a PHP daemon, specifically excluding its suitability for PHP scripts that generate output for web browsers.

This is a lightweight class that minimally consumes RAM, CPU, or disk I/O resources. There are no dependencies to other libraries.

Sample usage

<?php

use Nicodemuz\PhpTailF\Monitor;

require 'vendor/autoload.php';

$monitor = new Monitor(
    filePath: '/tmp/test.log',
    sleepMicroseconds: 500000,
);

foreach ($monitor->run() as $output) {
    echo $output;
}

Authors

Credits

Based on the work from https://github.com/Basch3000/php-tail

统计信息

  • 总下载量: 1.95k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-02-09