<?php trait closeit { function getClosure($functionName) { return function() use ($functionName) { call_user_func_array([$this, $functionName], func_get_args()); }; } } class foo { use closeit; function bar() { echo "Bar"; } } $foo = new foo(); $bar = $foo->getClosure('bar'); $bar();
You have javascript disabled. You will not be able to edit any code.
Value for `_results` contains invalid data `array`