Skip to content

Instantly share code, notes, and snippets.

@datashaman
Created May 8, 2019 05:18
Show Gist options
  • Save datashaman/75da3815c9c53060cab318b6351168a1 to your computer and use it in GitHub Desktop.
Save datashaman/75da3815c9c53060cab318b6351168a1 to your computer and use it in GitHub Desktop.
Datashaman\Logic\C Example
<?php
<<<CONFIG
packages:
- "datashaman/logic: dev-master"
CONFIG;
#
# This is a Melody script. http://melody.sensiolabs.org/
#
use function Datashaman\Logic\C;
use function Datashaman\Logic\repr;
$now = new DateTime();
$p = C('DateTime');
echo repr($p($now)) . PHP_EOL;
echo repr($p(12)) . PHP_EOL;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment