Created
October 24, 2011 13:46
-
-
Save hartym/1309062 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 | |
class toto | |
{ | |
public function __construct() | |
{ | |
$this->method = function () { | |
echo 'it works'; | |
}; | |
} | |
} | |
$t = new toto(); | |
$t->method(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment