PHPackages                             ptlis/php-serialized-data-editor - 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. ptlis/php-serialized-data-editor

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

ptlis/php-serialized-data-editor
================================

Manipulate PHP-serialized data without deserialization

0.0.2(7y ago)223221MITPHPPHP &gt;=7.1.0CI failing

Since Feb 8Pushed 5y ago1 watchersCompare

[ Source](https://github.com/ptlis/php-serialized-data-editor)[ Packagist](https://packagist.org/packages/ptlis/php-serialized-data-editor)[ RSS](/packages/ptlis-php-serialized-data-editor/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependencies (1)Versions (4)Used By (1)

ptlis/php-serialized-data-editor
================================

[](#ptlisphp-serialized-data-editor)

Tools for manipulating PHP serialized datastructures without deserializing and re-serializing the data.

This is useful when:

- You don't or can't have the classe definitions loaded (e.g. when processing arbitrary data in a DB, Redis etc).
- You don't want to invoke the `__wakeup` method (e.g. it tries to connect to a resource not available in the execution context).

[![Build Status](https://camo.githubusercontent.com/e55921e84f0986047a3905796997fe93c8697bc832c704822bf9def8dddc4185/68747470733a2f2f7472617669732d63692e636f6d2f70746c69732f7068702d73657269616c697a65642d646174612d656469746f722e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/ptlis/php-serialized-data-editor) [![Code Coverage](https://camo.githubusercontent.com/d1b8764f97678ec6d12ef05953acfd0efb67b0179b6f4c5b5255059c6f6e988c/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f70746c69732f7068702d73657269616c697a65642d646174612d656469746f722f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/ptlis/php-serialized-data-editor/?branch=master) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/49d99883b4ed95a97c693da00be88632ccf8f7538bbedd62d8ce2ee63c739389/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f70746c69732f7068702d73657269616c697a65642d646174612d656469746f722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/ptlis/php-serialized-data-editor/?branch=master) [![License](https://camo.githubusercontent.com/074b89bca64d3edc93a1db6c7e3b1636b874540ba91d66367c0e5e354c56d0ea/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e737667)](https://github.com/ptlis/php-serialized-data-editor/blob/master/LICENSE) [![Latest Stable Version](https://camo.githubusercontent.com/9d5ca2b83bb36025871ac3734ead57a6bb6d352792c97c1084f05c78e90a6036/68747470733a2f2f706f7365722e707567782e6f72672f70746c69732f7068702d73657269616c697a65642d646174612d656469746f722f762f737461626c65)](https://packagist.org/packages/ptlis/php-serialized-data-editor)

Install
-------

[](#install)

With composer:

```
$ composer require ptlis/php-serialized-data-editor
```

Usage
-----

[](#usage)

This library currently supports basic search &amp; replacement of string values (ignoring array keys and property names):

```
use ptlis\SerializedDataEditor\Editor;

// Mock some serialized data
$serialized = serialize([
    'test' => 'foo',
    'test2' => 'foobar foo',
    'foo' => 'baz'
]);

$editor = new Editor();

// Count how many times the search term exists as a string value
$containsCount = $editor->containsCount($serialized, 'foo');  // $containsCount === 3

// Replace all instances of the search term with the replacement term
$modified = $editor->replace($serialized, 'foo', 'wibble');
/**
 * $modified when unserialized is:
 * [
 *     'test' => 'wibble',
 *     'test2' => 'wibblebar wibble',
 *     'foo' => 'baz'
 * ]
 */
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity47

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.

###  Release Activity

Cadence

Every ~2 days

Total

2

Last Release

2652d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7ff8b14a43509e32a3892de4a8907b3b7764a6f7910454ae3f0f03e2541eea5c?d=identicon)[ptlis](/maintainers/ptlis)

---

Top Contributors

[![ptlis](https://avatars.githubusercontent.com/u/508422?v=4)](https://github.com/ptlis "ptlis (30 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ptlis-php-serialized-data-editor/health.svg)

```
[![Health](https://phpackages.com/badges/ptlis-php-serialized-data-editor/health.svg)](https://phpackages.com/packages/ptlis-php-serialized-data-editor)
```

###  Alternatives

[pocketmine/bedrock-data

Blobs of data generated from Minecraft: Bedrock Edition, used by PocketMine-MP

115418.0k5](/packages/pocketmine-bedrock-data)[nahid/qarray

QArray is a PHP abstraction for querying array

108403.2k2](/packages/nahid-qarray)[iben12/laravel-statable

Statable trait for Laravel Eloquent models

96299.8k1](/packages/iben12-laravel-statable)[flyntwp/acf-field-group-composer

52145.4k](/packages/flyntwp-acf-field-group-composer)[koriym/app-state-diagram

An Application Diagram Generator

38222.0k2](/packages/koriym-app-state-diagram)[terminal42/contao-leads

Leads extension for Contao Open Source CMS; Store and manage form data with ease!

41167.9k10](/packages/terminal42-contao-leads)

PHPackages © 2026

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