Skip to content

Instantly share code, notes, and snippets.

@bwilkins
Last active November 13, 2018 21:56
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 bwilkins/7813ceefc5741aac0166b449bc416f95 to your computer and use it in GitHub Desktop.
Save bwilkins/7813ceefc5741aac0166b449bc416f95 to your computer and use it in GitHub Desktop.
class String;alias phpversion to_s;end
alias echo print
def function(a);n,b=*a;define_singleton_method(n,&b);end
def method_missing(n,&b);(n=~/^to_/).nil?? [n,b]:nil;end
function displayVersion() {
echo "this is PHP " . phpversion();
echo "\n";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment