<?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())); }); }); }