Download the PHP package sj-i/ffi-zts-parallel without Composer

On this page you can find all versions of the php package sj-i/ffi-zts-parallel. 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 ffi-zts-parallel

ffi-zts-parallel

NTS-hosted wrapper around pecl/parallel that runs through sj-i/ffi-zts.

Gives a plain non-thread-safe PHP CLI access to real OS-thread parallelism via parallel\Runtime, without replacing the system PHP build. See docs/DESIGN.md in the core package for the full design.

Install

Both sj-i/ffi-zts and sj-i/ffi-zts-parallel ship as Composer plugins. On install, each downloads the pre-built binary matching your host's PHP minor / CPU arch / libc:

Trusting the plugins

Composer 2.2+ asks you to trust a new plugin before running it. In interactive shells you get a (y/N) prompt on first install. In CI / non-interactive environments, whitelist both up front:

Manual install / retry

If either plugin was skipped (--no-plugins, network outage, binary not yet published for a new PHP minor), retry the binary fetch on demand from the root project:

Usage

A minimal worker.php that fans out four parallel\Runtimes inside the embed:

All four workers report the same pid (same process) and zts=true (running in the embedded ZTS interpreter).

opcache.preload (2.x / PHP 8.5)

PHP 8.5 links opcache statically into libphp.so, so opcache.preload works under the embed out of the box and the preloaded classes / functions propagate into every parallel\Runtime worker thread:

See docs/PERFORMANCE.md in the core repo for fork-vs-embed measurements.

Read-only / containerised environments

If the vendor directory is not writable at runtime (baked into a container image, mounted read-only, etc.), Parallel::bootInMemory() skips the disk cache and patches + loads parallel.so via memfd_create(2):

Versioning

Major tracks the host PHP minor:

Minor / patch tracks upstream parallel releases plus wrapper fixes; bumping just the parallel version is composer update sj-i/ffi-zts-parallel.

Requirements

macOS, Windows, and musl are out of scope for the currently supported major lines; see the design doc for why.


All versions of ffi-zts-parallel with dependencies

PHP Build Version
Package Version
Requires php Version >=8.5,<8.6
composer-plugin-api Version ^2.0
ext-ffi Version *
sj-i/ffi-zts Version ^2.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 sj-i/ffi-zts-parallel contains the following files

Loading the files please wait ...