PHPackages                             watcherphp/watcher - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. watcherphp/watcher

ActiveLibrary[File &amp; Storage](/categories/file-storage)

watcherphp/watcher
==================

Watcher: Effortlessly Track and Manage Your File Changes Seamlessly

20PHP

Since Nov 9Pushed 6mo ago1 watchersCompare

[ Source](https://github.com/CodeWithSushil/watcher)[ Packagist](https://packagist.org/packages/watcherphp/watcher)[ RSS](/packages/watcherphp-watcher/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

- Task not completed
- Task completed

---

### Full Code:

[](#full-code)

```
$file = $argv[1];

$lastModified = filemtime($file);

echo "Watching $file for changes...\n";

while(true){
    clearstatcache();

    $currentModified = filemtime($file);

    if ($currentModified !== $lastModified) {
        echo "File changed, restarting script...\n";

        shell_exec("php $file");

        $lastModified = $currentModified;
    }

    sleep(1);
}
```

---

### File Watch Run

[](#file-watch-run)

```
php watch index.php
```

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance47

Moderate activity, may be stable

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity13

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/14ee8bc204856d2c784a628778d5ae25e5ef14052cce198ca3a7943574832260?d=identicon)[CodeWithSushil](/maintainers/CodeWithSushil)

---

Top Contributors

[![CodeWithSushil](https://avatars.githubusercontent.com/u/94827178?v=4)](https://github.com/CodeWithSushil "CodeWithSushil (15 commits)")

---

Tags

filewatcherphp-filewatcherwatcherwatcherphp

### Embed Badge

![Health badge](/badges/watcherphp-watcher/health.svg)

```
[![Health](https://phpackages.com/badges/watcherphp-watcher/health.svg)](https://phpackages.com/packages/watcherphp-watcher)
```

###  Alternatives

[knplabs/gaufrette

PHP library that provides a filesystem abstraction layer

2.5k39.8M123](/packages/knplabs-gaufrette)[superbalist/flysystem-google-storage

Flysystem adapter for Google Cloud Storage

26320.6M30](/packages/superbalist-flysystem-google-storage)[illuminate/filesystem

The Illuminate Filesystem package.

15161.6M2.6k](/packages/illuminate-filesystem)[creocoder/yii2-flysystem

The flysystem extension for the Yii framework

2931.7M62](/packages/creocoder-yii2-flysystem)[flowjs/flow-php-server

PHP library for handling chunk uploads. Works with flow.js html5 file uploads.

2451.6M15](/packages/flowjs-flow-php-server)[madnest/madzipper

Easier zip file handling for Laravel applications.

1382.3M6](/packages/madnest-madzipper)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
