serialize-php

serialize-php ================== [![Build Status](https://travis-ci.org/idjem/serialize-php.svg?branch=master)](https://travis-ci.org/idjem/serialize-php) [![Version](https://img.shields.io/npm/v/serialize-php.svg)](https://www.npmjs.com/package/serialize

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
serialize-php
1.1.26 years ago6 years agoMinified + gzip package size for serialize-php in KB

Readme

serialize-php
Build Status Version License
Javascript tool to: unserialize php serialized data. serialize data the way php does.

Installation

Node.js

Install from npm:
npm install serialize-php

Usage

Serialize

var serialize = require("serialize-php").serialize;
var result = serialize({key : "test serialize"})
console.log(result);
//a:1:{s:3:"key";s:14:"test serialize";}

Unserialize

var unserialize = require("serialize-php").unserialize;
var result      = unserialize("a:1:{s:3:\"key\";s:16:\"test unserialize\"}");
console.log(result.key);
//test unserialize