Skip to content

Instantly share code, notes, and snippets.

@assertchris
Last active February 15, 2016 23:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save assertchris/2f9ed946aa2bf8e08b2d to your computer and use it in GitHub Desktop.
Save assertchris/2f9ed946aa2bf8e08b2d to your computer and use it in GitHub Desktop.
composer require yay/yay:dev-master
vendor/bin/yay range.yay.php > range.php
<?php
$first = 1;
$last = 5;
var_dump(range(1, 5));
var_dump(range($first, 5));
var_dump(range(1, $last));
<?php
macro { T_VARIABLE·A |> T_VARIABLE·B } >> {
range(T_VARIABLE·A, T_VARIABLE·B)
}
macro { T_LNUMBER·A |> T_LNUMBER·B } >> {
range(T_LNUMBER·A, T_LNUMBER·B)
}
macro { T_VARIABLE·A |> T_LNUMBER·B } >> {
range(T_VARIABLE·A, T_LNUMBER·B)
}
macro { T_LNUMBER·A |> T_VARIABLE·B } >> {
range(T_LNUMBER·A, T_VARIABLE·B)
}
$first = 1;
$last = 5;
var_dump(1 |> 5);
var_dump($first |> 5);
var_dump(1 |> $last);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment