PHPackages                             temkaa/signal - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. temkaa/signal

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

temkaa/signal
=============

A simple library for subscribing to PHP signals

v0.0.2(1y ago)0181MITPHPPHP ^8.3

Since Sep 25Pushed 1y ago1 watchersCompare

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

READMEChangelogDependencies (3)Versions (3)Used By (1)

### A simple signal subscriber manager implementation.

[](#a-simple-signal-subscriber-manager-implementation)

### Installation

[](#installation)

```
composer require temkaa/signal

```

This package automatically detects what OS are you using for both testing and production confidence. For Windows it uses `sapi_windows_set_ctrl_handler`, for Linux - `pcntl_signal`.
Package allows you to specify subscribers for specific PHP signals. To use this package you need:

1. If you use Windows, you need to have functions `and` enabled;
2. If you use any other OS you need to have `pcntl` extension and functions `pcntl_async_signals`, `pcntl_signal` enabled.

Example:

```
