Created
December 23, 2014 23:39
-
-
Save chadmandoo/df30587b0e6891ef9ade to your computer and use it in GitHub Desktop.
This file contains 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 | |
function fun1(Callable $func) | |
{ | |
$func(); | |
return "This function is "; | |
} | |
class Sample | |
{ | |
public function __invoke() | |
{ | |
echo "Callable "; | |
} | |
} | |
$obj = new Sample(); | |
echo fun1($obj); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment