alecrabbit/php-helpers

PHP helpers functions

Maintainers

👁 alecrabbit

Package info

github.com/alecrabbit/php-helpers

pkg:composer/alecrabbit/php-helpers

Fund package maintenance!

Patreon

Statistics

Installs: 8 463

Dependents: 9

Suggesters: 0

Stars: 0

Open Issues: 1

0.8.2 2020-05-17 18:32 UTC

Requires

Requires (Dev)

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT 0f1b588d3a159bfff880e24309354a87bd8392d7

arraywrapformattrimstringprivateprotectedfirstunsetzeros


README

Set of useful helper functions

👁 PHP Version
👁 Build Status
👁 Appveyor Status
👁 Scrutinizer Code Quality
👁 Code Coverage
👁 Total Downloads

👁 Latest Stable Version
👁 Latest Stable Version
👁 Latest Unstable Version

👁 License

Installation

composer require alecrabbit/php-helpers

Usage

See examples

Quick example
use function \AlecRabbit\typeOf;

echo typeOf(1); // "integer"

Functions

Miscellaneous Functions

  • typeOf()
  • swap()
  • inContainer()
  • inRange()
  • onWindows()

Array functions

  • is_homogeneous()
  • formatted_array()
  • array_unset_first()
  • array_unset_last()

Numeric functions

  • is_negative()
  • bounds()
  • trim_zeros()

Object functions

  • callMethod()
  • getValue()

Time functions

  • now()
  • carbon()
  • base_timestamp()

String functions

  • tag()
  • brackets()
  • str_wrap()
  • format_bytes()
  • format_time()
  • format_time_auto()
  • boolToStr()