PHPackages                             nullbio/cbor-php - 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. nullbio/cbor-php

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

nullbio/cbor-php
================

CBOR Encoder/Decoder for PHP

v3.3.1(3mo ago)0129↑536.4%1MITPHPPHP ^8.5

Since Mar 25Pushed 3mo agoCompare

[ Source](https://github.com/nullbio/cbor-php)[ Packagist](https://packagist.org/packages/nullbio/cbor-php)[ RSS](/packages/nullbio-cbor-php/feed)WikiDiscussions 3.3.x Synced 3w ago

READMEChangelog (1)Dependencies (1)Versions (3)Used By (1)

CBOR for PHP
============

[](#cbor-for-php)

[![License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](LICENSE)

A comprehensive PHP library for encoding and decoding **CBOR** (Concise Binary Object Representation) data according to [RFC 8949](https://tools.ietf.org/html/rfc8949).

Features
--------

[](#features)

- ✅ Full support for all CBOR major types (0-7)
- ✅ Extensible tag system with built-in support for common tags
- ✅ Streaming decoder for efficient memory usage
- ✅ Type-safe API with modern PHP features
- ✅ Comprehensive support for indefinite-length objects
- ✅ Built-in normalization to PHP native types

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

[](#installation)

```
composer require nullbio/cbor-php
```

**Requirements:**

- PHP 8.5.0
- ext-mbstring 8.5.0
- brick/math 0.14.8

**Optional but recommended:**

- ext-gmp or ext-bcmath for improved performance with large integers
- ext-bcmath for Big Float and Decimal Fraction support

This fork intentionally hard-pins its Composer and platform dependencies. Update them only as an explicit maintenance action.

This project follows [semantic versioning](http://semver.org/) strictly.

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

[](#quick-start)

```
