PHPackages                             valzargaming/php-osc - 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. valzargaming/php-osc

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

valzargaming/php-osc
====================

Open Sound Control (OSC) Client Library for PHP

v2.0.0(3mo ago)06PHPPHP &gt;=8.1.2

Since Jan 25Pushed 3mo agoCompare

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

READMEChangelog (3)Dependencies (5)Versions (5)Used By (0)

Installation
------------

[](#installation)

Install the dependencies with Composer:

Run `composer install` to install the project dependencies.

Bot example
-----------

[](#bot-example)

A production-ready example, `bot.php`, is included. It sends periodic OSC messages (sender-only).

Listener and acknowledgement functionality has been moved to the separate entrypoint script `osc_listener.php`.

Environment variables for `bot.php`:

- `OSC_DEST` – remote IP to send messages to (default `127.0.0.1`)
- `OSC_PORT` – remote port to send messages to (default `9000`)
- `OSC_INTERVAL` – send interval in seconds (default `5`)
- `OSC_ADDRESS` – OSC address for heartbeat messages (default `/bot/heartbeat`)

Examples:

Run the bot with defaults:

```
php bot.php
```

Send to a custom destination:

```
OSC_DEST=192.168.1.50 OSC_PORT=3890 OSC_INTERVAL=2 OSC_ADDRESS=/my/bot php bot.php
```

Start the separate listener (acknowledgement service) in another terminal:

```
php osc_listener.php
```

Examples
--------

[](#examples)

See `examples.md` for more usage examples, including the ReactPHP UDP server (`server.php`) and how to run it together with `bot.php` for end-to-end testing.

php-osc
=======

[](#php-osc)

PSR-4 version of Open Sound Control (OSC) Client Library for PHP

Authors:

- Andy W. Schmeder  (original, 2003-2007)
- Jason Soares  (PSR-4 update)
- Valithor Obsidion  (maintainer, 2026-present)

Copyright:

- Copyright (c) 2003-2007 Andy W. Schmeder
- Copyright (c) 2026-present Valithor Obsidion

Version: 2.0

Requirements: PHP &gt;= 8.1.2

For information about Open Sound Control, see

**Known Issues**

- **Listener callbacks in automated tests**: The earlier external-process integration test (starting `server.php` and `osc_listener.php` as detached processes) failed to observe the server-&gt;listener callback in the automated PHPUnit run on Windows. This was caused by process-start timing and platform-specific spawn/quoting behavior. As a result we now provide an in-process integration test that is reliable under PHPUnit: [tests/IntegrationTest.php](tests/IntegrationTest.php#L1).
- **Manual run that did work**: A manual interactive run did exercise the end-to-end flow successfully — start the server and listener, send a probe, and observe the callback/ack cycle in the logs. Example commands used interactively in PowerShell:

    - Start the server (foreground):

        php server.php
    - Start the listener (foreground):

        php osc\_listener.php
    - Send a probe to trigger the server callback (helper script):

        php tests/probe\_9001.php

    The listener log (osc-listener.log) then shows the received probe and the ack sent back.
- **Why this matters**: If you rely on automated external-process integration tests on Windows CI, prefer the in-process ReactPHP test harness provided in [tests/IntegrationTest.php](tests/IntegrationTest.php#L1) or run the manual commands interactively. If you want the external-process test to work in CI, it may require platform-specific adjustments to process startup and timeouts.

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance79

Regular maintenance activity

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 94.8% 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.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

112d ago

Major Versions

v1.0.1 → v2.0.02026-01-26

### Community

Maintainers

![](https://www.gravatar.com/avatar/6f85d19ae7440b91717206e5e67342bae2dcc1c8de0a6f4333bbb75b18212d0f?d=identicon)[valzargaming](/maintainers/valzargaming)

---

Top Contributors

[![valzargaming](https://avatars.githubusercontent.com/u/7202504?v=4)](https://github.com/valzargaming "valzargaming (109 commits)")[![frequenc1](https://avatars.githubusercontent.com/u/1216816?v=4)](https://github.com/frequenc1 "frequenc1 (6 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/valzargaming-php-osc/health.svg)

```
[![Health](https://phpackages.com/badges/valzargaming-php-osc/health.svg)](https://phpackages.com/packages/valzargaming-php-osc)
```

###  Alternatives

[friendsofphp/php-cs-fixer

A tool to automatically fix PHP code style

13.5k234.7M20.6k](/packages/friendsofphp-php-cs-fixer)[react/react

ReactPHP: Event-driven, non-blocking I/O with PHP.

9.1k3.6M63](/packages/react-react)[react/stream

Event-driven readable and writable streams for non-blocking I/O in ReactPHP

689126.8M194](/packages/react-stream)[team-reflex/discord-php

An unofficial API to interact with the voice and text service Discord.

1.1k379.4k24](/packages/team-reflex-discord-php)[react/child-process

Event-driven library for executing child processes with ReactPHP.

34076.1M136](/packages/react-child-process)[nativephp/mobile

NativePHP for Mobile

82724.0k43](/packages/nativephp-mobile)

PHPackages © 2026

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