PHPackages                             selaz/substrate-codec-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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. selaz/substrate-codec-php

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

selaz/substrate-codec-php
=========================

For substrate scale codec

03341PHP

Since Sep 15Pushed 2y agoCompare

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

READMEChangelogDependenciesVersions (1)Used By (1)

[![grants_badge](./grants_badge.png)](./grants_badge.png)

### Substrate scale codec

[](#substrate-scale-codec)

[![Github ACTION](https://github.com/gmajor-encrypt/php-scale-codec/actions/workflows/ci.yml/badge.svg)](https://github.com/gmajor-encrypt/php-scale-codec/actions)

---

PHP SCALE Codec For substrate

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

[](#installation)

```
composer require gmajor/substrate-codec-php
```

Basic Usage
-----------

[](#basic-usage)

### Autoloading

[](#autoloading)

Codec supports `PSR-4` autoloaders.

```

```

### Metadata

[](#metadata)

For more information on metadata, please refer to

Currently, metadata decode/encode only supports v12/13/v14 More test you can found here

```

```

### Extrinsic

[](#extrinsic)

For more information on Extrinsic, please refer to

More test you can found here

```

```

### Event

[](#event)

For more information on Event, please refer to

More test you can found here

```

```

### Example

[](#example)

More examples can refer to the test file

Test
----

[](#test)

```
make test

```

Resources
---------

[](#resources)

- [Polkadot.js](http://polkadot.js.org/)
- [Polkascan](https://github.com/polkascan/py-scale-codec)
- [scale.go](https://github.com/itering/scale.go)
- [substrate.dev](https://substrate.dev/docs/en/knowledgebase/advanced/codec)

License
-------

[](#license)

The package is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT)

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity21

Early-stage or recently created project

 Bus Factor1

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

### Community

Maintainers

![](https://www.gravatar.com/avatar/60a10991a9de0956065be5839a37480393fb914725e0b0e60172d3f5c263be61?d=identicon)[Selaz](/maintainers/Selaz)

---

Top Contributors

[![gmajor-encrypt](https://avatars.githubusercontent.com/u/63032554?v=4)](https://github.com/gmajor-encrypt "gmajor-encrypt (119 commits)")[![leonardocustodio](https://avatars.githubusercontent.com/u/5619696?v=4)](https://github.com/leonardocustodio "leonardocustodio (13 commits)")[![selaz](https://avatars.githubusercontent.com/u/1086350?v=4)](https://github.com/selaz "selaz (3 commits)")

### Embed Badge

![Health badge](/badges/selaz-substrate-codec-php/health.svg)

```
[![Health](https://phpackages.com/badges/selaz-substrate-codec-php/health.svg)](https://phpackages.com/packages/selaz-substrate-codec-php)
```

###  Alternatives

[mtdowling/jmespath.php

Declaratively specify how to extract elements from a JSON document

2.0k472.8M135](/packages/mtdowling-jmespathphp)[opis/closure

A library that can be used to serialize closures (anonymous functions) and arbitrary data.

2.6k230.0M284](/packages/opis-closure)[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M229](/packages/masterminds-html5)[sabberworm/php-css-parser

Parser for CSS Files written in PHP

1.8k191.2M65](/packages/sabberworm-php-css-parser)[michelf/php-markdown

PHP Markdown

3.5k52.4M345](/packages/michelf-php-markdown)[jms/metadata

Class/method/property metadata management in PHP

1.8k152.8M88](/packages/jms-metadata)

PHPackages © 2026

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