2017 © Pedro Peláez
 

library ophp

Forget Haystack vs Needle order, the object *IS* the Haystack.

image

ericpoe/ophp

Forget Haystack vs Needle order, the object *IS* the Haystack.

  • Tuesday, February 16, 2016
  • by ericpoe
  • Repository
  • 2 Watchers
  • 7 Stars
  • 8 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 8 Versions
  • 0 % Grown

The README.md

GitHub Workflow Status for Code Testing (master branch) GitHub Workflow Status for Code Analysis (master branch) Software License Packagist Version, (*1)

Haystack

Forget Haystack vs Needle order, the object IS the Haystack. Haystack is a library that allows for pipelining, immutable structures, and UTF-8 strings., (*2)

Install

Haystack is installable as a Composer package:, (*3)

$ composer require ericpoe/haystack

Running tests

$ git clone ...
$ composer install
$ vendor/bin/phpunit

Background

Trying to remember commonly-used PHP functions for strings and arrays in PHP is hard. Are array functions haystack-needle and string functions needle-haystack, or vice versa? Quick, without looking at documentation or using a decent IDE, which is correct: in_array($needle, $haystack) or in_array($haystack, needle)?, (*4)

Also, even though many of the same kinds of functions are run against arrays and strings, the function names are wildly different. strstr and in_array do similar things, yet have different names and are called in different manners., (*5)

Goal

This project will attempt to match as many string and array verbs as possible. For example, $foo->contains("elvis") should determine if the string "elvis" is contained in the $foo object, it shouldn't matter if $foo is a string or an array. Ditto $foo->map($callable) and $foo->filter($callable)., (*6)

How do I?

Check out the manual for all the things you can do with the Haystack library., (*7)

The Versions

16/02 2016

dev-rebrandAsHaystack

dev-rebrandAsHaystack

Forget Haystack vs Needle order, the object *IS* the Haystack.

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

The Development Requires

16/02 2016

dev-master

9999999-dev

An imagining of PHP as if it were designed around objects.

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

The Development Requires

16/02 2016

dev-rearrangeFS

dev-rearrangeFS

An imagining of PHP as if it were designed around objects.

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

The Development Requires

15/02 2016

dev-upgradeHHVM3_11

dev-upgradeHHVM3_11

An imagining of PHP as if it were designed around objects.

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

The Development Requires

10/02 2016

v0.3.0

0.3.0.0

An imagining of PHP as if it were designed around objects.

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

The Development Requires

02/08 2015

v0.2.0

0.2.0.0

An imagining of PHP as if it were designed around objects.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

27/07 2015

v0.1.1

0.1.1.0

An imagining of PHP as if it were designed around objects.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

27/07 2015

v0.1.0

0.1.0.0

An imagining of PHP as if it were designed around objects.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires