Last active
September 15, 2016 16:11
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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