phpfn / phpfn
Centralized monorepository for functional libraries
2.0.1
2020-11-22 21:17 UTC
Requires
- php: >=7.4
- symfony/polyfill-php80: ^1.0
Requires (Dev)
- laminas/laminas-code: ~3.4
- phpunit/phpunit: ^9.0
- roave/security-advisories: dev-master
- squizlabs/php_codesniffer: ^3.0
- symfony/console: ~4.3|~5.0
- symfony/var-dumper: ~4.3|~5.0
- symplify/monorepo-builder: ^7.0
- vimeo/psalm: ^3.6
Replaces
- phpfn/curry: 2.0.1
- phpfn/immutable: 2.0.1
- phpfn/pipe: 2.0.1
- phpfn/placeholder: 2.0.1
- phpfn/symbol: 2.0.1
This package is auto-updated.
Last update: 2025-04-06 06:41:30 UTC
README
Functional PHP
Installation
Library can be installed into any PHP application:
$ composer require phpfn/phpfn
In order to access library make sure to include vendor/autoload.php
in your file.
<?php require __DIR__ . '/vendor/autoload.php';
Usage
This package includes
phpfn/curry
is an implementation of currying and partial application.phpfn/immutable
is a little helper to ensure object immutability.phpfn/pipe
for the ability to use a sequence of functions as a chain.phpfn/placeholder
is a placeholder (looks like that:_
) symbol implementation.phpfn/symbol
for the ability to create unique identifiers within the system.