PHPackages                             bjoernffm/step-functions - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. bjoernffm/step-functions

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

bjoernffm/step-functions
========================

Step Functions for php

v0.1.2(6y ago)0811Apache-2.0PHPPHP ^7.2CI failing

Since Nov 4Pushed 6y ago1 watchersCompare

[ Source](https://github.com/bjoernffm/step-functions)[ Packagist](https://packagist.org/packages/bjoernffm/step-functions)[ Docs](https://github.com/bjoernffm/step-functions)[ RSS](/packages/bjoernffm-step-functions/feed)WikiDiscussions master Synced 4d ago

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

Step Functions
==============

[](#step-functions)

[![GitHub](https://camo.githubusercontent.com/a8a526efe7ed05f9a283e42cef3cc8f9d554e7bee4836ffac4393733fed82288/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f626a6f65726e66666d2f737465702d66756e6374696f6e73)](https://camo.githubusercontent.com/a8a526efe7ed05f9a283e42cef3cc8f9d554e7bee4836ffac4393733fed82288/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f626a6f65726e66666d2f737465702d66756e6374696f6e73)[![GitHub release (latest by date)](https://camo.githubusercontent.com/8472af3964dafa3ae3459c9cc9094b42165592cecb4b8537c51d1dd55e86f424/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f626a6f65726e66666d2f737465702d66756e6374696f6e73)](https://camo.githubusercontent.com/8472af3964dafa3ae3459c9cc9094b42165592cecb4b8537c51d1dd55e86f424/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f626a6f65726e66666d2f737465702d66756e6374696f6e73)[![GitHub top language](https://camo.githubusercontent.com/4643327b4a6e5f5eea718410f8e1b5dbbca954dad32be181f85a931e10075e58/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c616e6775616765732f746f702f626a6f65726e66666d2f737465702d66756e6374696f6e73)](https://camo.githubusercontent.com/4643327b4a6e5f5eea718410f8e1b5dbbca954dad32be181f85a931e10075e58/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c616e6775616765732f746f702f626a6f65726e66666d2f737465702d66756e6374696f6e73)[![Build Status](https://camo.githubusercontent.com/17dc7ad6a75db19a1f6931758e73086ce72d6780dbd0891cdd6d1b5cbeeafe18/68747470733a2f2f7472617669732d63692e6f72672f626a6f65726e66666d2f737465702d66756e6374696f6e732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/bjoernffm/step-functions)[![Codacy Badge](https://camo.githubusercontent.com/accf63f36952291bb0b8061f075757a7c22ca5f7e580ef22b4fbd23ef9f2abd7/68747470733a2f2f6170692e636f646163792e636f6d2f70726f6a6563742f62616467652f47726164652f3330303162623462373432633435643639646231636536633331373162323865)](https://www.codacy.com/manual/bjoernffm/step-functions?utm_source=github.com&utm_medium=referral&utm_content=bjoernffm/step-functions&utm_campaign=Badge_Grade)[![StyleCI](https://camo.githubusercontent.com/7715419b96983213cbd2ac705f87d5f0585a1d0c470f0fca1abc540457988fbb/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3231393435353035302f736869656c643f6272616e63683d6d6173746572267374796c653d666c6174)](https://github.styleci.io/repos/219455050)

**Step Functions** is a library which offers implementation of step functions. Define one or multiple functions, define the bounds where they are in use and this library will interpolate between the functions.

Installation
------------

[](#installation)

This library is provided as [Composer package](https://packagist.org/packages/bjoernffm/step-functions). To install it, simply execute the folowing command:

```
composer require bjoernffm/step-functions

```

**Note:** This library requires **PHP 7.2**.

Usage
-----

[](#usage)

The simplest usage that will mostly fulfill your needs is to define one or more functions and add them to an interpolator instance:

```
