A CLI tool for php-serialize
.
npm install -g php-serialize
php-serialize [options] [command]
-
-V, --version
Output the version number -
-h, --help
Display help for command
-
serialize [input]
Serialize a JavaScript object into PHP format -
unserialize [input]
Unserialize a PHP serialized string into a JavaScript object -
help [command]
Display help for command
php-serialize serialize '{"key": "value"}'
php-serialize unserialize 'a:1:{s:3:"key";s:5:"value";}'
You can also use stdin for input:
echo '{"key": "value"}' | php-serialize serialize
echo 'a:1:{s:3:"key";s:5:"value";}' | php-serialize unserialize
This project is licensed under the MIT License.