Created
July 11, 2017 14:54
-
-
Save prigazzi/f58c972c5678ec7469d5387ca6c84503 to your computer and use it in GitHub Desktop.
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 | |
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