Skip to content

Instantly share code, notes, and snippets.

@prigazzi
Created July 11, 2017 14:54
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 prigazzi/f58c972c5678ec7469d5387ca6c84503 to your computer and use it in GitHub Desktop.
Save prigazzi/f58c972c5678ec7469d5387ca6c84503 to your computer and use it in GitHub Desktop.
<?php
class Injectable
{
public function tomalaToda($argument)
{
return "Comete ". $argument;
}
}
class Golosa
{
public function damelaPapi($function)
{
echo $function("Esta");
}
}
$injectable = new Injectable;
$golosa = new Golosa();
$golosa->damelaPapi([$injectable, 'tomalaToda']);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment