name instanceof Name){ $sFunction = $oExpr->name->name; } else { $sFunction = PhpExpressionEvaluator::GetInstance()->EvaluateExpression($oExpr->name); } if (! in_array($sFunction, self::WHITELIST)){ throw new ModuleFileReaderException("FuncCall $sFunction not supported"); } $aArgs=[]; foreach ($oExpr->args as $arg){ /** @var \PhpParser\Node\Arg $arg */ $aArgs[]=$arg->value->value; } $oReflectionFunction = new ReflectionFunction($sFunction); return $oReflectionFunction->invoke(...$aArgs); } }