functional-php

Primitives for functional programming in PHP

  • Owner: tinkerpop/rexster
  • Platform:
  • License:: Other
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

Functional PHP: Functional primitives for PHP

Gitter
Build Status Dependency Status Average time to resolve an issue Percentage of issues still open Scrutinizer Code Quality

NOTE: functional-php used to come with a C extension that implemented most of the functions natively. As the
performance differences weren’t that huge compared to the maintenance cost it has been removed.

A set of functional primitives for PHP, heavily inspired by Scala’s traversable
collection
,
Dojo’s array functions and
Underscore.js

  • Works with arrays and everything implementing interface Traversable
  • Consistent interface: for functions taking collections and callbacks, first parameter is always the collection, then the callback.
    Callbacks are always passed $value, $index, $collection. Strict comparison is the default but can be changed
  • Calls 5.3 closures as well as usual callbacks
  • All functions reside in namespace Functional to not raise conflicts with any other extension or library

Functional Comic

Installation

Run the following command in your project root:

composer require lstrojny/functional-php

Docs

Read the docs

Contributing

  1. Fork and git clone the project
  2. Install dependencies via composer install
  3. Run the tests via composer run tests
  4. Write code and create a PR

Mailing lists

Thank you

Main metrics

Overview
Name With Ownertinkerpop/rexster
Primary LanguageJava
Program languagePHP (Language Count: 7)
Platform
License:Other
所有者活动
Created At2010-02-12 03:00:02
Pushed At2023-12-17 03:29:41
Last Commit At2017-09-05 07:00:01
Release Count17
Last Release Name2.6.0 (Posted on 2014-09-17 08:33:47)
First Release Name0.1 (Posted on 2010-12-14 17:35:04)
用户参与
Stargazers Count431
Watchers Count51
Fork Count110
Commits Count1.6k
Has Issues Enabled
Issues Count0
Issue Open Count0
Pull Requests Count35
Pull Requests Open Count7
Pull Requests Close Count10
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private