Download the PHP package rikanishu/php-multi-process without Composer

On this page you can find all versions of the php package rikanishu/php-multi-process. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-multi-process

php-multi-process

PHP library for parallel shell command execution Build Status

Installation via composer:

Either run

or add

to the section of your file.

Example:

Description

This library is designed to execute single / multiple parallel process on blocking / non-blocking mode. The library provides an interface for convenient configuring external process execution. The basic concepts are Pool and Command objects. Pool is a set of commands that creates and delegates execution to ExecutionContext, ExecutionContext builds Process objects for each command and runs it. Command object represents single external command.

The library uses proc_* API and select sys call that are provided by standard PHP library. It has no external dependency.

Usage

General usage scenario suggests that you pass some commands to a Pool instance which will be executed parallel on blocking / non-blocking mode depends on params passed on. Here is example of non-blocking execution of four commands:

, , , and show different format of commands applied by Pool. You can also pass instance of Command right away because Pool implicitly converts shell command text to Command instances and checks input data for this class first.

The Pool’s method returns Futures array that represents each command, e.g. represents from example above. You can always use method to get current future for executed command. Non executed command does not have Future and if you call for non-executed Command, Exception will be raised. You can call for checking when your code does not know, has command been ran or hasn't.

On non blocking mode call creates a process array and returns control to calling procedure. The process will execute at the meantime in background and when you call Future’s method, it blocks execution process until result is received or time limit is expired. You can always check Future’s if you want to avoid blocking and continue your useful calculating process.

And also if you need to run only single command you can use command method directly. It will create new Pool with single command and return Future. Use method to run execution in blocking mode and receive execution result.

Or

Pool options

Pool takes options array as second parameter. You can set some options to Pool by two ways:

Options list

Command options

You can configure Command same as Pool by two ways:

Or

And also you can control options when you pass shell command to Pool construct as array second element:

Options list

All versions of php-multi-process with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package rikanishu/php-multi-process contains the following files

Loading the files please wait ....