Download the PHP package phunkie/streams without Composer

On this page you can find all versions of the php package phunkie/streams. 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 streams

Phunkie Streams

CI Latest Stable Version Total Downloads License PHP Version

Phunkie Streams is a PHP functional library for working with streams inspired by functional streaming libraries like fs2 (Scala). It allows you to process data in a declarative, composable way.

Installation

Features

What's Implemented

Phunkie Streams has completed Phases 1-3 of development. Here's what's currently available:

Core Stream Types

Stream Operations

File I/O

Network Operations

Resource Management

Error Handling

Concurrency & Parallel Processing

Not Yet Implemented

Pure Streams

Transformations on Pure Streams

Infinite Streams

Picking on Infinite Streams with runlog

Combining Streams

Basic Usage

Resource Management with Bracket

Phunkie Streams uses the bracket pattern from phunkie/effect for safe resource management:

See examples/bracket.php for more examples.

Error Handling

Functional error handling with attempt() and handleError():

See doc/error-handling.md for comprehensive patterns.

Stream Composition with flatMap

Compose IO operations in type-safe pipelines:

See doc/composition.md for detailed patterns.

Stream Operations

through() - Pipe Operator

Apply transformation pipelines to streams:

takeWhile() and dropWhile()

chunk() - Batch Processing

See examples/stream-operations.php for 20 comprehensive examples.

File I/O with Streams

writeFile() - Stream Pipe for Writing

Write stream elements directly to files using the writeFile() pipe:

See examples/file-pipes.php for 12 comprehensive file I/O examples.

Network Operations

HTTP Requests

Make HTTP requests as streams:

TCP Sockets

TCP Client

TCP Server

Writing to Sockets

See examples/network.php for 15 comprehensive network examples.

Concurrency & Parallel Processing

Phunkie Streams provides concurrent stream processing with automatic fallback to sequential execution:

Parallel Map Operations

Parallel IO Effects

Parallel Stream Merging

Memory Efficiency

All parallel operations are memory-optimized to process data incrementally:

Memory Optimization

Phunkie Streams is designed for constant memory usage regardless of data size. All operations use true streaming with lazy evaluation:

File Operations

The writeFile() pipe function processes streams incrementally without loading everything into memory:

Parallel Operations

All parallel operations (parMap, parEvalMap, parTraverse, parMerge, parMergeMap) process data in chunks without materializing entire streams:

Iterator Protocol

Operations use PHP's Iterator protocol for memory-efficient streaming:

Best Practices

  1. Avoid toArray() on large streams - Use compile->drain for side effects
  2. Use chunk() for batching - Process data in manageable batches
  3. Leverage through() - Compose pipes for reusable transformations
  4. Use parallel operations - Let the library handle concurrent processing efficiently

Documentation

Examples

Contributing

We welcome contributions to Phunkie Streams! Please see our Contributing Guide for more information.

License

Phunkie Streams is licensed under the LICENSE file included in the repository.


All versions of streams with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2 || ^8.3 || ^8.4 || ^8.5
phunkie/phunkie Version ^1.1.0
phunkie/effect Version ^1.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 phunkie/streams contains the following files

Loading the files please wait ...