PHPackages                             metaworx/serialized - 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. metaworx/serialized

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

metaworx/serialized
===================

PHP Library for Serialized Data

0.2.5(5y ago)0181AGPL-3.0-or-laterPHPPHP ~7.2

Since Dec 29Pushed 2y agoCompare

[ Source](https://github.com/metaworx/Serialized)[ Packagist](https://packagist.org/packages/metaworx/serialized)[ RSS](/packages/metaworx-serialized/feed)WikiDiscussions master Synced 5d ago

READMEChangelogDependencies (1)Versions (3)Used By (1)

```
  Serialized - PHP Library for Serialized Data

  Copyright (C) 2010-2011 Tom Klingenberg, some rights reserved

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License as
    published by the Free Software Foundation, either version 3 of the
    License, or (at your option) any later version.

    See COPYING.

  README

    Serialized is a set of classes that can parse serialized data into a
  normalized representation (semi structured data or S-expression).

    The base service is to parse serialized data into a so called Array
  Notation which represents both structure and the value(s) of PHP
  serialized data. See ARRAYNOT.

    This can be used to inspect and validate serialized data w/o the need
  to unserialize it first. For example if waking up sleeping objects is
  unwanted (parsing instead the factual process of unserializing). The
  parsed data can then be inspected and changed.

    Serialized variables (Sessions) are supported as well. Those are
  a list of serialized values with their variable name.

    Potential field of use is static data analysis, session display,
  inspection and manipulation of serialized data, converting etc. .

    Right now, the library can already do both: parsing into the Array
  Notation and dumping it into serialized data again. Output into other
  formats (Text, XML, ...) is possible as well.

    The following output formats to display serialized data and sessions
  are - as of now - available (example of a serialized array data sample
  dumped differently):

    * Text - Plain text, suitable for display in a shell environment.

        `-- array(4):
             +-- [user] => string(9): "user-name"
             +-- [network] => array(1):
             |    `-- [localip] => string(7): "1.2.3.4"
             +-- [2] => string(4): "Zwei"
             `-- [language] => string(6): "german"

    * XML - Well-formed, machine readable and easy to convert.

    * Serialized - To store back.

        a:4:{s:4:"user";s:9:"user-name";s:7:"network";a:1:{s:7:"localip";\
        s:7:"1.2.3.4";}i:2;s:4:"Zwei";s:8:"language";s:6:"german";}

    The library sources contain a test-suite to guarantee a certain level
  of confidence and strictness.

    If you run into any problems with serialized data on your end, please
  report back as this improves the library. This will help to break the
  parser so to reproduce and extend the test-suite with abstracted
  serialized data for future regression testing.

    Naturally private data will be anonmyzed before it is put into the test-
  suite and generally it will not be published w/o a written consent.

    Feedback of any kind is always warmheartly appreciated.

    Requirements:

    PHP 5.3.3 or higher
    PHPUNIT 3.5.5 or higher (for the test-suite)

    Use:

      To make use of the library, copy over the src directory into your
    library folder.

      Serialized ships with a PSR-0 compatbile autoloader. To make use of the
    library require the base file:

      require_once('library/Serialized.php');

      After including it (the autoloader), auto-loading is enabled and the
    parser and the dumpers can be used:

      $array = Serialized\Parser::parse($serialized);

      Example: 00-basic-parsing

      Instead of using the autoloader, the library can be manually loaded as
    well:

      require_once('library/Serialized.php');
      Serialized::loadLibrary();

      For debugging purposes, there is a dump function which prints structure
    and data of a serialized string to standard output:

      $parser = new Serialized\Parser($serialized);
      $parser->dump();

      Example: 01-debug-dump

    Resources:

    PHP Serialize Function (PHP Manual)
  http://php.net/manual/en/function.serialize.php

    PHP Unserialize Function (PHP Manual)
  http://php.net/manual/en/function.unserialize.php

    Object Serialization (PHP Manual)
  http://php.net/manual/en/language.oop5.serialization.php

    The Serializable interface (PHP Manual)
  http://php.net/manual/en/class.serializable.php

    Runtime Configuration "unserialize_callback_func" (PHP Manual)
  http://www.php.net/manual/en/var.configuration.php#unserialize-callback-func

    PHP Session Decode Function (PHP Manual)
  http://php.net/manual/en/function.session-decode.php

    PHP Serialize C Sourcecode
  https://github.com/php/php-src/blob/master/ext/standard/var.c

    PHP Unserialize C Sourcecode
  http://svn.php.net/viewvc/php/php-src/trunk/ext/standard/var_unserializer.re

    PHP Serialization And Recursion Demystified (by Andrea Giammarchi; 2009-09-07)
  http://webreflection.blogspot.com/2009/09/php-serialization-and-recursion.html

    Recursive Reference Serialize Library (by Nghia Nguyen; 2009-06-01)
  http://www.phpclasses.org/package/5336-PHP-Serialize-objects-with-cyclic-references.html
```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

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

Unknown

Total

1

Last Release

1964d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6409550?v=4)[metaworx](/maintainers/metaworx)[@metaworx](https://github.com/metaworx)

---

Top Contributors

[![ktomk](https://avatars.githubusercontent.com/u/352517?v=4)](https://github.com/ktomk "ktomk (161 commits)")[![bhujagendra-ishaya](https://avatars.githubusercontent.com/u/87441244?v=4)](https://github.com/bhujagendra-ishaya "bhujagendra-ishaya (20 commits)")[![martin-rueegg](https://avatars.githubusercontent.com/u/6409516?v=4)](https://github.com/martin-rueegg "martin-rueegg (3 commits)")

### Embed Badge

![Health badge](/badges/metaworx-serialized/health.svg)

```
[![Health](https://phpackages.com/badges/metaworx-serialized/health.svg)](https://phpackages.com/packages/metaworx-serialized)
```

###  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)
