php-serialize-client

5.0.1 • Public • Published

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 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.

/php-serialize-client/

    Package Sidebar

    Install

    npm i php-serialize-client

    Weekly Downloads

    4

    Version

    5.0.1

    License

    MIT

    Unpacked Size

    3.2 kB

    Total Files

    4

    Last publish

    Collaborators

    • elob