imagePush($image, null, null, $auth)->then(function ($result) { echo json_encode($result, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . PHP_EOL; }, 'printf'); $loop->run();