Skip to content

texthtml/php-object-reaper

Folders and files

NameName
Last commit message
Last commit date
Sep 10, 2024
May 16, 2025
Nov 21, 2024
Feb 9, 2025
Sep 10, 2024
Sep 10, 2024
Sep 10, 2024
Sep 10, 2024
Feb 10, 2025
Sep 10, 2024
Sep 10, 2024
Sep 26, 2024

Repository files navigation

Object Reaper: here for your objects when they pass away

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

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published