Skip to content

Commit

Permalink
Add some echoing.
Browse files Browse the repository at this point in the history
  • Loading branch information
retrinko committed Jun 19, 2016
1 parent c41356e commit 120621b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions samples/sample.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,15 @@
require_once __DIR__ . '/../vendor/autoload.php';

$value = ['a', 'b', 'c'];
printf('Original value: %s', PHP_EOL);
var_dump($value);

$serializer = SerializerFactory::bySerializedContentType(JsonSerializer::SERIALIZED_CONTENT_TYPE);
$serializedValue = $serializer->serialize($value);
printf('Serialized value using %s: %s', 'JsonSerializer', PHP_EOL);
var_dump($serializedValue);

$serializer = SerializerFactory::bySerializedContentType(PhpSerializer::SERIALIZED_CONTENT_TYPE);
$serializedValue = $serializer->serialize($value);
printf('Serialized value using %s: %s', 'PhpSerializer', PHP_EOL);
var_dump($serializedValue);

0 comments on commit 120621b

Please sign in to comment.