PHPackages                             axcherednikov/php-websocket - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. axcherednikov/php-websocket

ActivePhp-ext[HTTP &amp; Networking](/categories/http)

axcherednikov/php-websocket
===========================

Native PHP extension providing RFC 6455 WebSocket protocol helpers and a WebSocket server runtime.

1.3.0(2w ago)310MITCPHP &gt;=8.1CI passing

Since May 18Pushed 2w agoCompare

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

READMEChangelog (10)DependenciesVersions (10)Used By (0)

ext-websocket
=============

[](#ext-websocket)

Native WebSocket extension for PHP.

`ext-websocket` keeps RFC 6455 protocol work in C and exposes a small PHP API for synchronous PHP code, async runtimes, and the native server runtime included in the extension.

Requirements
------------

[](#requirements)

- PHP &gt;= 8.1
- Linux, macOS, BSD, or another POSIX-compatible OS
- `phpize`, `php-config`, make, and a C compiler

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

[](#installation)

### Via PIE

[](#via-pie)

```
pie install axcherednikov/php-websocket
```

### From Source

[](#from-source)

```
phpize
./configure --enable-websocket
make
make test
sudo make install
```

Enable the extension:

```
extension=websocket
```

Check that PHP can load it:

```
php -m | grep websocket
```

With Homebrew PHP:

```
/opt/homebrew/opt/php@8.3/bin/phpize
./configure --enable-websocket --with-php-config=/opt/homebrew/opt/php@8.3/bin/php-config
make -j"$(sysctl -n hw.ncpu)"
```

Quick Start
-----------

[](#quick-start)

```
