Download the PHP package upscale/stdlib-object-lifecycle without Composer
On this page you can find all versions of the php package upscale/stdlib-object-lifecycle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download upscale/stdlib-object-lifecycle
More information about upscale/stdlib-object-lifecycle
Files in upscale/stdlib-object-lifecycle
Package stdlib-object-lifecycle
Short Description Library to monitor lifecycle of objects allocated by long-running PHP scripts
License Apache-2.0
Homepage https://github.com/upscalesoftware/stdlib-object-lifecycle
Informations about the package stdlib-object-lifecycle
Object Lifecycle Monitoring
This library tracks existence of objects throughout their lifecycle until eventual destruction. It can accurately detect memory leaks in long-running CLI scripts or event-driven web-servers, such as Swoole or ReactPHP.
The monitoring can be easily activated for applications with centralized object instantiation, i.e. using a DI container.
Features:
- Watch any object w/o modifying its source code
- Detect objects that are still alive
- Detect objects that have been destroyed
- Debug info on alive/destroyed objects: class, hash, trace
- Garbage collection of circular references
Installation
The library is to be installed via Composer as a dependency:
Usage
Detect destruction of objects:
Methods detectAliveObjects()
and detectGoneObjects()
return the following debug information:
Contributing
Pull Requests with fixes and improvements are welcome!
License
Licensed under the Apache License, Version 2.0.