Created
August 12, 2014 08:54
-
-
Save robknight/498661a34bbb078ab9c3 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
[8] #default> class MyClass { function say($words, $times) { for ($i = 0; $i < $times; $i++) { echo $words . "\n"; } } } | |
[9] #default> $x = new MyClass; | |
// object(MyClass)( | |
// | |
// ) | |
[10] #default> $y = array($x, 'say'); | |
// array( | |
// 0 => object(MyClass)( | |
// | |
// ), | |
// 1 => 'say' | |
// ) | |
[11] #default> $y('foo', 3); | |
foo | |
foo | |
foo | |
// NULL | |
[12] #default> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment