Skip to content

EloB/php-serialize-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP Serializer CLI Tool

A CLI tool for php-serialize.

Installation

npm install -g php-serialize-client

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 format
  • unserialize [input] Unserialize a PHP serialized string into a JavaScript object
  • help [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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published