2017 © Pedro Peláez
 

library superserializer

Can serialize everything, even object with properties contains Closures (big thx to SuperClosure project) and callables

image

edwardstock/superserializer

Can serialize everything, even object with properties contains Closures (big thx to SuperClosure project) and callables

  • Tuesday, February 28, 2017
  • by edwardstock
  • Repository
  • 1 Watchers
  • 1 Stars
  • 18 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 29 % Grown

The README.md

SuperSerializer

Can serialize everything, even object with properties contains Closures (big thx to SuperClosure project) and callables, (*1)

Build Status, (*2)

Usage

<?php
use edwardstock\superserializer\Serializer;

$o       = new \stdClass();
$o->func = function () {};

$o2       = new \stdClass();
$o2->prop = [
    'k' => function () {
        },
];

$values = [
    'integer'     => 1,
    'float'       => 111.111,
    'object'      => new \stdClass(),
    'array'       => ['k' => 'v'],
    'array_with_closure'  => [
        'k' => function () {
        },
    ],
    'object_with_closure' => $o,
    'bool_true'           => true,
    'bool_false'          => false,
    'null'        => null,
];

$ser1 = Serializer::serialize($o);
$ser2 = Serializer::serialize($o2);
$ser3 = Serializer::serialize($values);

// $o1
$unser1 = Serializer::unserialize($ser1);

// $o2
$unser2 = Serializer::unserialize($ser2);

// $values
$unser3 = Serializer::unserialize($ser3);

The Versions

28/02 2017

dev-master

9999999-dev

Can serialize everything, even object with properties contains Closures (big thx to SuperClosure project) and callables

  Sources   Download

MIT

The Requires

  • jeremeamia/superclosure ^2.3

 

The Development Requires

by Eduard Maximovich

28/02 2017

1.0.0

1.0.0.0

Can serialize everything, even object with properties contains Closures (big thx to SuperClosure project) and callables

  Sources   Download

MIT

The Requires

  • jeremeamia/superclosure ^2.3

 

The Development Requires

by Eduard Maximovich