Giter Site home page Giter Site logo

functional-php's Introduction

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

functional-php's People

Contributors

lstrojny avatar phanan avatar rquadling avatar alexeyshockov avatar gabrielhomsi avatar jasonmm avatar szepeviktor avatar krtek4 avatar rodnaph avatar bor0 avatar adrienbrault avatar soutoner avatar colinodell avatar dsp avatar erikvv avatar leocavalcante avatar mschwager avatar pyldin601 avatar scrutinizer-auto-fixer avatar royopa avatar trebi avatar povilasb avatar pierrejoye avatar mortalflesh avatar oguzdumanoglu avatar naderman avatar mattjmattj avatar elazar avatar win0err avatar dereckson avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.