{"id":15025324,"url":"https://github.com/jeffotoni/phpconcurrency","last_synced_at":"2026-02-07T10:32:14.626Z","repository":{"id":134047497,"uuid":"96902339","full_name":"jeffotoni/phpconcurrency","owner":"jeffotoni","description":"PHP is single threds, unfortunately it is not designed to work in competition or parallelism.","archived":false,"fork":false,"pushed_at":"2017-07-11T18:32:10.000Z","size":3221,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-23T20:56:06.372Z","etag":null,"topics":["concurrent-programming","php","php-7","php7"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jeffotoni.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-07-11T14:27:23.000Z","updated_at":"2022-02-12T14:16:03.000Z","dependencies_parsed_at":"2024-06-14T02:16:33.579Z","dependency_job_id":null,"html_url":"https://github.com/jeffotoni/phpconcurrency","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jeffotoni/phpconcurrency","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffotoni%2Fphpconcurrency","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffotoni%2Fphpconcurrency/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffotoni%2Fphpconcurrency/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffotoni%2Fphpconcurrency/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jeffotoni","download_url":"https://codeload.github.com/jeffotoni/phpconcurrency/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffotoni%2Fphpconcurrency/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29192652,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T07:37:03.739Z","status":"ssl_error","status_checked_at":"2026-02-07T07:37:03.029Z","response_time":63,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["concurrent-programming","php","php-7","php7"],"created_at":"2024-09-24T20:02:04.994Z","updated_at":"2026-02-07T10:32:14.611Z","avatar_url":"https://github.com/jeffotoni.png","language":"PHP","readme":"# PHP Concurrency\n\nPHP is single threds, unfortunately it is not designed to work in competition or parallelism.\n\nCompetition is not parallelism. Parallelism is when two or more threads are running the code simultaneously against different processors.\n\nWhat I will demonstrate here is a simple example in PHP running in competition.\n\nOne way to do this is to use [class.threds](http://php.net/manual/pt_BR/class.thread.php.)  \n\nI will use \"GOTO\" to compete with PHP, it is not an elegant and not the most indicated, but here we have the didactic objective and nothing else.\n\n[Goto](http://php.net/manual/en/control-structures.goto.php) can be used to jump to another section of the program.\n\nOne can not jump into a loop or switch structure.\n\nOne can jump out of them, and one common use is to use goto in place of a multi-level break.\n\nBut in our example we will not do FOR, WHILE or better no control structure, we WILL USE OWN goto to generate OUR FOR.\n\nWe will make a FOR without using \"FOR\" simply with goto, and that is where our example looks very interesting when we are going to compete.\n\nOur example will fill 2 vectors but in concurrency.\n\nVetA and VetB with 10 random positions.\n\n\n# Example of operation\n\n![image](https://github.com/jeffotoni/phpconcurrency/blob/master/gif/phpconcurrency.gif)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeffotoni%2Fphpconcurrency","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjeffotoni%2Fphpconcurrency","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeffotoni%2Fphpconcurrency/lists"}