A set of really useful, well tested and high performant php functions

v4.4.0 2021-07-02 13:25 UTC

README

PHP 8.0 pipeline status coverage report \ PHP 7.4 pipeline status coverage report \ PHP 7.3 pipeline status coverage report \ PHP 7.2 pipeline status coverage report

About

co-stack.com lib provides generic everyday functions, which aim to help you to focus on your main task. This package tries to achieve this by providing:

  • intuitive function names
  • high quality code
  • constant performance optimization
  • extensive documentation
  • 100% test coverage
  • dependency free code
  • mostly pure functions
  • namespaced functions
  • Static Methods as OOP alternative

So you don't need to bother about performance or implementation details.

Function list

  • array_filter_recursive: Like array_filter, but recursively.
  • array_value. Get an array value by an index path.
  • array_property. array_column for objects
  • concat_paths. Concatenate filesystem paths without duplicate directory separators.
  • mkdir_deep. mkdir with the recursive flag, but without mode.
  • factory. Creates a new object by mapping an associative array to constructor arguments and public properties.
  • filter. Factory for simple filter closures for use with array_filter.

Compatibility

There is one branch for each supported PHP version. Each branch has its own major version number. Only PHP versions, which are officially maintained are supported. The master branch is on the same commit as the highest supported PHP Version Branch. Lower supported versions receive backports of all features, which are possible in that PHP Version. (e.g. type annotations will be backported, but Attributes will not be available below PHP 8.0)

VersionPHP VersionBranch NameMaintained until
1.x7.2php7231 Jul 2021
2.x7.3php736 Dec 2021
3.x7.4php7428 Nov 2022
4.x8.0php8026 Nov 2023