In Javascript there is call() and apply(), that partially, but resolves to call_user_func() and call_user_func_array() in PHP.
Now, the difference here is that we can pass a variable with call() and apply() to be used as this within the function scope.
Can I achieve something like this with PHP?
Update:
In Javascript:
var x = function(passed)
{
return { dis : this, passd : passed };
};
console.log(x(44)); // window, 44
console.log(x.call(25, 44)); // 25, 44
.call() first parameter within the function scope, becomes this.
From the PHP manual for Callbacks:
Example below: