{"id":15027144,"url":"https://github.com/teodoroleckie/async","last_synced_at":"2026-03-14T08:38:37.267Z","repository":{"id":57070522,"uuid":"360418070","full_name":"teodoroleckie/async","owner":"teodoroleckie","description":"⚡ Easy asynchronous and parallel PHP","archived":false,"fork":false,"pushed_at":"2021-05-11T07:16:43.000Z","size":132,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-19T20:28:27.585Z","etag":null,"topics":["async-php","asynchronous","asynchronous-php","asynchronous-process","high-performance","multiple-processes","parallel","parallel-php","parallel-processes","parallel-tasks","php-8","php-high-performance"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/teodoroleckie.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["teodoroleckie"],"custom":["https://www.paypal.com/donate?business=ZHYA2MTGA4884\u0026currency_code=USD"]}},"created_at":"2021-04-22T06:41:33.000Z","updated_at":"2024-01-29T10:57:05.000Z","dependencies_parsed_at":"2022-08-24T14:54:22.802Z","dependency_job_id":null,"html_url":"https://github.com/teodoroleckie/async","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teodoroleckie%2Fasync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teodoroleckie%2Fasync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teodoroleckie%2Fasync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teodoroleckie%2Fasync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/teodoroleckie","download_url":"https://codeload.github.com/teodoroleckie/async/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243330319,"owners_count":20274039,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["async-php","asynchronous","asynchronous-php","asynchronous-process","high-performance","multiple-processes","parallel","parallel-php","parallel-processes","parallel-tasks","php-8","php-high-performance"],"created_at":"2024-09-24T20:05:51.214Z","updated_at":"2025-12-25T08:53:56.919Z","avatar_url":"https://github.com/teodoroleckie.png","language":"PHP","funding_links":["https://github.com/sponsors/teodoroleckie","https://www.paypal.com/donate?business=ZHYA2MTGA4884\u0026currency_code=USD"],"categories":[],"sub_categories":[],"readme":"# Asynchronous and parallel PHP\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/tleckie/async.svg?style=flat-square)](https://packagist.org/packages/tleckie/async)\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/teodoroleckie/async/badges/quality-score.png?b=main)](https://scrutinizer-ci.com/g/teodoroleckie/async/?branch=main)\n[![Build Status](https://scrutinizer-ci.com/g/teodoroleckie/async/badges/build.png?b=main)](https://scrutinizer-ci.com/g/teodoroleckie/async/build-status/main)\n[![Total Downloads](https://img.shields.io/packagist/dt/tleckie/async.svg?style=flat-square)](https://packagist.org/packages/tleckie/async)\n\n## Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require tleckie/async\n```\n\n## Usage\n\n```php\n\u003c?php\n\nuse Tleckie\\Async\\Async;\n\n$async = new Async();\n\nforeach([1,2,3,4,5,6,7,8,9,10] as $value){\n\n    $async-\u003eadd(static function() use($value){\n    \n        sleep(1);\n        \n        return $value*2;\n        \n    })-\u003ethen(static function($value){\n        \n        var_dump($value);\n        \n    })-\u003ecatch(static function(\\Exception $exception){\n    \n        var_dump($exception-\u003egetMessage());\n    });\n}\n\n$async-\u003ewait();\n```\n\n\n### Catch exception\n```php\n\u003c?php\n\nuse Tleckie\\Async\\Async;\n\n$async = new Async();\n\n$async-\u003eadd(static function (){\n\n    throw new \\Exception('Error...');\n\n})-\u003ethen(static function ($value) {\n\n})-\u003ecatch(static function ($exception) {\n\n    var_dump($exception);\n});\n\n$async-\u003ewait();\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteodoroleckie%2Fasync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteodoroleckie%2Fasync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteodoroleckie%2Fasync/lists"}