Skip to content

Instantly share code, notes, and snippets.

@datashaman
Created May 8, 2019 05:06
Show Gist options
  • Save datashaman/9f56652ab4a105db2197555c8b4d1bed to your computer and use it in GitHub Desktop.
Save datashaman/9f56652ab4a105db2197555c8b4d1bed to your computer and use it in GitHub Desktop.
Datashaman\Logic\repr Example
<?php
<<<CONFIG
packages:
- "datashaman/logic: dev-master"
CONFIG;
#
# This is a Melody script. http://melody.sensiolabs.org/
#
use function Datashaman\Logic\repr;
use Ds\Map;
print repr([1, 2, 3]) . PHP_EOL;
print repr(['a' => 'A', 'b' => 'B', 'c' => 'C']) . PHP_EOL;
print repr(new Ds\Map(['a' => 'A', 'b' => 'B', 'c' => 'C'])) . PHP_EOL;
print repr("string") . PHP_EOL;
print repr(100) . PHP_EOL;
print repr(new DateTime()) . PHP_EOL;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment