PHPackages                             jotjunior/php-utcode - 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. jotjunior/php-utcode

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

jotjunior/php-utcode
====================

UTCode from Umgeher Torgersen

09PHP

Since Mar 17Pushed 8y ago1 watchersCompare

[ Source](https://github.com/JotJunior/php-utcode)[ Packagist](https://packagist.org/packages/jotjunior/php-utcode)[ RSS](/packages/jotjunior-php-utcode/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (1)Used By (0)

UTCode for PHP
==============

[](#utcode-for-php)

### Install via Composer

[](#install-via-composer)

```
$ mkdir project_name
$ cd project_name
$ composer require jotjunior/php-utcode:dev-master
```

### Examples

[](#examples)

#### Encoding an Array

[](#encoding-an-array)

```
$array = [
    'id'        => 1,
    'firstName' => 'John',
    'lastName'  => 'doe',
    'ratio'     => 3.8,
    'category'  => [
        'id'   => 1234,
        'name' => 'Test User'
    ]
];
$code = new Encode($array);
echo $code, PHP_EOL;
```

Result: `ut:d:k2:idi:1ek9:firstNameu8:Sm9obg==k8:lastNameu4:RG9lk5:ratiof:3.800000zk8:categoryd:k2:idi:1234ek4:nameu12:VGVzdCBVc2Vyee`

#### Encoding a PHP Object

[](#encoding-a-php-object)

```
$object = new \stdClass();
$object->id = 1;
$object->firstName = 'John';
$object->lastName = 'Doe';
$object->ratio = 3.8;
$object->category = new \stdClass();
$object->category->id = 1334;
$object->category->name = 'Test User';
$code = new Encode($object);
echo $code, PHP_EOL;
```

Result: `ut:d:k2:idi:1ek9:firstNameu8:Sm9obg==k8:lastNameu4:RG9lk5:ratiof:3.800000zk8:categoryd:k2:idi:1234ek4:nameu12:VGVzdCBVc2Vyee`

#### Encoding a JSON string

[](#encoding-a-json-string)

```
$json
    = '{
   "id": 1,
   "firstName": "John",
   "lastName": "Doe",
   "ratio": 3.8,
   "category": {
       "id": 1234,
       "name": "Test User"
   }
}';
$code = new Encode($json);
echo $code, PHP_EOL;
```

Result: `ut:d:k2:idi:1ek9:firstNameu8:Sm9obg==k8:lastNameu4:RG9lk5:ratiof:3.800000zk8:categoryd:k2:idi:1234ek4:nameu12:VGVzdCBVc2Vyee`

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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/9a6f318464721b0bd6abcb222dbf8ea778064d006df391eae0b6cdc6b7bdaa04?d=identicon)[Jot Junior](/maintainers/Jot%20Junior)

---

Top Contributors

[![JotJunior](https://avatars.githubusercontent.com/u/2686034?v=4)](https://github.com/JotJunior "JotJunior (15 commits)")

### Embed Badge

![Health badge](/badges/jotjunior-php-utcode/health.svg)

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

###  Alternatives

[abdelhamiderrahmouni/filament-monaco-editor

A monaco editor form field for filamentphp.

19190.4k](/packages/abdelhamiderrahmouni-filament-monaco-editor)[alleyinteractive/wp-captain-hook

Tools for manipulating private action/filter callbacks in WordPress.

12285.7k](/packages/alleyinteractive-wp-captain-hook)[helori/laravel-seo

SEO tools to insert meta and structured-data in laravel projects

124.9k](/packages/helori-laravel-seo)

PHPackages © 2026

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