<?php
$exports = call_user_func(function(){
$fn = function($a, $b, $c, $this_ = NULL) {
echo (string) gettype($this_);
return "abc it's as easy as $a $b $c";
};
$fn_obj = (object) function($a, $b, $c) use(&$fn) {
return call_user_func($fn, $a, $b, $c);
};
$fn_obj->call = function($this_, $a, $b, $c) use(&$fn) {
return call_user_func($fn, $a, $b, $c, $this_);
};
return $fn_obj;
});
echo (string) is_callable($exports->call);//$exports->call(1,2,3, array());
preferences:
35.44 ms | 402 KiB | 5 Q