Last active
August 29, 2015 14:06
-
-
Save kirkegaard/9d6925e7bbce2e4d492d 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 myObj | |
{ | |
public function a($args1) | |
{ | |
return function($args2) use ($args1) { | |
return array_merge($args1, $args2); | |
}; | |
} | |
} | |
$o1 = new myObj(); | |
$o2 = $o1->a(array('a')); | |
var_dump($o2(array('b'))); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment