php-serialize-client
v5.0.1
Published
A CLI tool for the package php-serialize
Downloads
13
Readme
PHP Serializer CLI Tool
A CLI tool for php-serialize
.
Installation
npm install -g php-serialize
Usage
php-serialize [options] [command]
Options
-V, --version
Output the version number-h, --help
Display help for command
Commands
serialize [input]
Serialize a JavaScript object into PHP formatunserialize [input]
Unserialize a PHP serialized string into a JavaScript objecthelp [command]
Display help for command
Examples
Serialize a JavaScript object
php-serialize serialize '{"key": "value"}'
Unserialize a PHP serialized string
php-serialize unserialize 'a:1:{s:3:"key";s:5:"value";}'
Using stdin
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
License
This project is licensed under the MIT License.