texthtml/object-reaper

Be notified of objects being destroyed

Installs: 191

Dependents: 2

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 1

Language:Shell

pkg:composer/texthtml/object-reaper

v1.1.0 2025-02-09 19:50 UTC

This package is auto-updated.

Last update: 2025-10-01 05:17:04 UTC


README

Let you register callbacks that will be called when objects are destroyed.

Installation

composer req texthtml/object-reaper

Usage

$a = (object) [];

// Attach a callback to any object
// It will be called when the object is destroyed

Reaper::watch($a, function () { echo "Good Bye"; });

// "Good bye" will be printed when $a is destroyed