Nathanmac\Utilities\Parser\Parser::serialize PHP Method

serialize() public method

Serialized Data parser, helper function.
public serialize ( $payload ) : array
$payload
return array
    public function serialize($payload)
    {
        return $this->parse($payload, new Serialize());
    }

Usage Example

Beispiel #1
0
<?php

require "../vendor/autoload.php";
use Nathanmac\Utilities\Parser\Parser;
$parser = new Parser();
echo "<h1>Serialised Object Example</h1>";
$parsed = $parser->serialize('a:1:{s:7:"message";a:4:{s:2:"to";s:10:"Jack Smith";s:4:"from";s:8:"Jane Doe";s:7:"subject";s:11:"Hello World";s:4:"body";s:24:"Hello, whats going on...";}}');
echo "<pre>";
print_r($parsed);
echo "</pre>";
All Usage Examples Of Nathanmac\Utilities\Parser\Parser::serialize