Skip to content

Instantly share code, notes, and snippets.

@magbicaleman
Last active September 15, 2016 16:11
Show Gist options
  • Save magbicaleman/45a23c7e8998bbaf915353bbfb7e150a to your computer and use it in GitHub Desktop.
Save magbicaleman/45a23c7e8998bbaf915353bbfb7e150a to your computer and use it in GitHub Desktop.
Just an example of php shorthand functions, when using hhvm as your fast-cgi
<?php
$x = $args ==> {
extract($args);
return 'multi-line '. $b . $s;
};
echo $x(['b' => 'sample ', 's' => 'dog']);
// multi parameter syntax does not seem to be supported in .php but it is in .hh files
// https://docs.hhvm.com/hack/lambdas/introduction
// Thank you to @EranSchoellhorn for finding this somewhere on gist
exit;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment