{"id":22213573,"url":"https://github.com/g023/parapopphp","last_synced_at":"2025-06-18T20:34:22.659Z","repository":{"id":199571310,"uuid":"703222756","full_name":"g023/ParaPopPHP","owner":"g023","description":"ParaPopPHP - A PHP library for running PHP processes in parallel using popen()","archived":false,"fork":false,"pushed_at":"2023-10-17T06:04:59.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T06:25:43.099Z","etag":null,"topics":["multiprocess","multiprocessing","multitasking","parallel-computing","parallel-processes","parallel-programming","php","php8","popen","process","processes"],"latest_commit_sha":null,"homepage":"https://github.com/g023/ParaPopPHP","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/g023.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-10-10T20:38:44.000Z","updated_at":"2023-10-10T20:48:02.000Z","dependencies_parsed_at":"2024-01-12T04:44:39.397Z","dependency_job_id":"6baa7327-689a-474b-b58a-8c532237a90d","html_url":"https://github.com/g023/ParaPopPHP","commit_stats":{"total_commits":3,"total_committers":1,"mean_commits":3.0,"dds":0.0,"last_synced_commit":"d10993be5aa3bc142e2d67f0b296f381fcd24c1d"},"previous_names":["g023/parapopphp"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/g023/ParaPopPHP","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g023%2FParaPopPHP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g023%2FParaPopPHP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g023%2FParaPopPHP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g023%2FParaPopPHP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/g023","download_url":"https://codeload.github.com/g023/ParaPopPHP/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g023%2FParaPopPHP/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260629601,"owners_count":23038955,"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":["multiprocess","multiprocessing","multitasking","parallel-computing","parallel-processes","parallel-programming","php","php8","popen","process","processes"],"created_at":"2024-12-02T21:10:12.059Z","updated_at":"2025-06-18T20:34:17.647Z","avatar_url":"https://github.com/g023.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ParaPopPHP - A PHP library for running PHP processes in parallel using `popen()`\n\n![GitHub](https://img.shields.io/github/license/g023/ParaPopPHP)\n![GitHub release (latest by date)](https://img.shields.io/github/v/release/g023/ParaPopPHP)\n![GitHub contributors](https://img.shields.io/github/contributors/g023/ParaPopPHP)\n![GitHub issues](https://img.shields.io/github/issues/g023/ParaPopPHP)\n\n## Introduction\n\nParaPopPHP is open-source software licensed under the BSD 3-Clause License.\n\nParaPopPHP is a PHP library for running PHP processes in parallel using `popen()` instead of the more common `pcntl_fork()` method. This allows for parallel processing on both Windows and Linux environments. ParaPopPHP provides a single class that can be included in your project, allowing you to run multiple PHP processes or other programs in parallel with ease.\n\n## Features\n\n- Run PHP processes in parallel using the `popen()` function.\n- Cross-platform support for Windows and Linux.\n- Easily integrate parallel processing into your PHP projects.\n- Execute custom commands or scripts concurrently.\n\n## Installation\n\nParaPopPHP can be included in your PHP project by simply including the `class.ppop.php` file.\n\n```php\nrequire_once('class.ppop.php');\n\n\n## Usage\n```php\n$paraPop = new ppPHP();\n\n// Define the commands to run in parallel\n$paraPop-\u003ecommands = [\n    'php class.ppop.php +cmd=test_delay +delay=2 +arg1=1 +arg2=15 +arg3=3',\n    'php class.ppop.php +cmd=test_delay +delay=3 +arg1=4 +arg2=10 +arg3=6',\n    'php class.ppop.php +cmd=test_add +delay=2 +arg1=7 +arg2=5 +arg3=9',\n    'ls -l',\n];\n\n// Run the commands concurrently\n$paraPop-\u003erun();\n```\n\n# ppPHPCommander - Managing Plugins for ParaPopPHP\n\n![GitHub](https://img.shields.io/github/license/g023/ParaPopPHP)\n![GitHub release (latest by date)](https://img.shields.io/github/v/release/g023/ParaPopPHP)\n![GitHub contributors](https://img.shields.io/github/contributors/g023/ParaPopPHP)\n![GitHub issues](https://img.shields.io/github/issues/g023/ParaPopPHP)\n\n## Introduction\nThe ppPHPCommander class is open-source software licensed under the BSD 3-Clause \n\n`ppPHPCommander` is a companion class for the ParaPopPHP library, designed to help you manage and execute plugins for various commands that you may want to run in parallel using the `ppPHP` class. This class simplifies the process of adding, associating, and executing plugins, allowing you to customize the behavior of individual commands.\n\n## Features\n\n- Easily manage and organize plugins for different commands.\n- Associate plugins with specific command names.\n- Execute custom logic or actions for each command using plugins.\n- Seamlessly integrate with the ParaPopPHP library for parallel processing.\n\n## Installation\n\nThe `ppPHPCommander` class is included in the ParaPopPHP library and does not require separate installation. To use it, simply include the `class.ppop.php` file and create an instance of the `ppPHPCommander` class.\n\n```php\nrequire_once('class.ppop.php');\n$commander = new ppPHPCommander();\n\n## Usage\n```php\n$commander = new ppPHPCommander();\n\n/*\nAdding Plugins\nTo add a new plugin to the ppPHPCommander instance, use the addPlugin() method. Provide a command name and an instance of a plugin class.\n*/\n// Create a plugin instance and associate it with the 'test_delay' command\n$testDelayPlugin = new TestDelayCommand();\n$commander-\u003eaddPlugin('test_delay', $testDelayPlugin);\n\n/*\nExecuting Commands\nTo execute a command using the ppPHPCommander class, call the execute() method and provide an associative array of arguments, including the cmd key representing the command to execute.\n*/\n$command = [\n    'cmd' =\u003e 'test_delay',\n    'arg1' =\u003e 'value1',\n    'arg2' =\u003e 'value2',\n];\n\n$commander-\u003eexecute($command);\n```\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fg023%2Fparapopphp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fg023%2Fparapopphp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fg023%2Fparapopphp/lists"}