call_user_func_array

Supported Versions: PHP 4 >= 4.0.4, PHP 5, PHP 7, PHP 8
Call a callback with an array of parameters
<?php call_user_func_array(callable $callback, array $args): mixed
<?php     {

        return new Promise(function ($resolve) use ($emitter, $event, $fn) {

            $emitter->on($event, function () use ($resolve, $fn) {

                $resolve(call_user_func_array($fn, func_get_args()));

            });

        });

    }