Javascript tool to:
- unserialize php serialized data.
- serialize data the way php does.
Install from npm:
npm install serialize-php
var serialize = require("serialize-php").serialize;
var result = serialize({key : "test serialize"})
console.log(result);
//a:1:{s:3:"key";s:14:"test serialize";}
var unserialize = require("serialize-php").unserialize;
var result = unserialize("a:1:{s:3:\"key\";s:16:\"test unserialize\"}");
console.log(result.key);
//test unserialize