Let's pretend this is happening inside of a class method (pure example):
public function runEvent($funcName, $params)
{
$funcName($this, $params);
}
//somewhere else
function myFunc($anBOject, $paramsHere, $somethingElse = NULL)
{
//do stuff
}
$SomeClassObj->runEvent('myFunc', array('dog', 'cat'));
Can I assume PHP will execute myFunc with the first parameter being $this, second being $params, and then NULL as the 3rd param (by default)?
This question is more just for understanding how PHP deals with variable functions. Im not actually having any issues in a certain project.
Thanks!