php2json
Convert PHP serializer strings to JSON
Decision gist · record as of 2026-08-14
No. The package is abandoned (last commit 2022-07-05, no updates since first release in 2017), has minimal adoption (2 stars), and only supports Python 2.7 and 3.6—both end-of-life versions. Unless you are maintaining legacy code tied to those exact versions and have no alternative, use a maintained PHP deserialization library or handle the conversion outside Python.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Package only provides wheels for Python 2.7 and 3.6; installation may fail or require compilation on other Python versions.
- Both versions are end-of-life.
- Medium install friction due to compiled wheels for specific Python versions (2.7, 3.6).
License · maintenance · safety
MIT (permissive) — MIT license is permissive and poses no restrictions on use, modification, or distribution in commercial or private projects.
last release 2017-10-17 (3223 days) · last repo commit 2022-07-05 · 2 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 111,816 downloads/mo, #12,396 on PyPI
Alternatives
Verify before relying
pip install php2json
import php2json
result = php2json.php2json(b's:3:"foo";')
print(result) # b'"foo"'- Whether the package works reliably with Python versions beyond 2.7 and 3.6, given the wheel availability and abandonment status.
- Current compatibility with modern Python 3.x versions and whether deserialization behavior remains stable.
- Whether unicode string handling limitations have been addressed or remain undefined.
What it is and what it does
php2json is a single-function library that converts PHP serialized strings into JSON format. It wraps the conversion process to enable downstream JSON decoders (like the standard json module or ujson) to parse the data, exploiting the fact that optimized JSON parsers are significantly faster than general PHP deserialization libraries.
The package is intended for one specific use case: migrating large volumes of PHP-serialized data where performance matters. It has no runtime dependencies and operates as a thin translation layer. The library explicitly does not support PHP objects, has undefined behavior with unicode strings, and requires input array keys to be strings or easily convertible to strings.
Use it for
- Bulk migration of PHP session data or cached objects stored in serialized format to a modern system.
- Converting exported PHP database records or configuration files to JSON for import into non-PHP applications.
- High-throughput processing of archived PHP-serialized data where speed is critical and the data lacks objects or unicode.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
No.
The package is abandoned (last commit 2022-07-05, no updates since first release in 2017), has minimal adoption (2 stars), and only supports Python 2.7 and 3.6—both end-of-life versions. Unless you are maintaining legacy code tied to those exact versions and have no alternative, use a maintained PHP deserialization library or handle the conversion outside Python.
Install
php2json on PyPI
Before you install
Medium install friction due to compiled wheels for specific Python versions (2.7, 3.6). Package is abandoned as of 2022-07-05 with no recent maintenance, and only 2 repository stars suggest limited adoption.
Package only provides wheels for Python 2.7 and 3.6; installation may fail or require compilation on other Python versions. Both versions are end-of-life.
License in practice
MIT license is permissive and poses no restrictions on use, modification, or distribution in commercial or private projects.
Quickstart
pip install php2json
import php2json
result = php2json.php2json(b's:3:"foo";')
print(result) # b'"foo"'
Verify before relying
- Whether the package works reliably with Python versions beyond 2.7 and 3.6, given the wheel availability and abandonment status.
- Current compatibility with modern Python 3.x versions and whether deserialization behavior remains stable.
- Whether unicode string handling limitations have been addressed or remain undefined.
Package facts
| License | MIT permissive |
| Python support | Not specified |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | None |
| Maintenance | Abandoned 3,223 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 111,816 / month, #12,396 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.6 |
Evidence: php2json-0.2-cp27-cp27mu-manylinux1_x86_64.whl; php2json-0.2-cp36-cp36m-manylinux1_x86_64.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “php serialization to json”
- php2jsonConverts PHP serialized strings to JSON format, designed for fast…
- phpserializeConverts Python objects to and from PHP serialization format,…
- phplyphply is a lexer and parser for PHP source code that generates…
Give your agent the search over MCP, or paste the wish link into any chat.
More Utilities packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Pygments is a syntax highlighter that colorizes source code and text in over 500 languages and formats, outputting to HTML, LaTeX, RTF, SVG, images, or ANSI terminal sequences.
Install it if you need to display or transform source code.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
See also phpserialize · jsons · json-encoder · ujson · jsonfield · stanio · JSON-log-formatter · DeepFriedMarshmallow · simplejson · SQLAlchemy-JSONField