func_get_args

Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Returns an array comprising a function's argument list
<?php func_get_args(): array
<?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()));

            });

        });

    }