ericpoe/ophp 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

ericpoe/ophp

最新稳定版本:v2.1.3

Composer 安装命令:

composer require ericpoe/ophp

包简介

Forget Haystack vs Needle order, the object IS the Haystack. Haystack is a library that allows for pipelining and immutable structures.

README 文档

README

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

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.

Install

Haystack is installable as a Composer package:

$ 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)?

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.

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).

How do I?

Check out the manual for all the things you can do with the Haystack library.

统计信息

  • 总下载量: 17
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 38
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 38
  • Watchers: 3
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-07-27