2017 © Pedro Peláez
 

library php-commons

Some common php functions

image

stinger-soft/php-commons

Some common php functions

  • Thursday, November 2, 2017
  • by Viburnum
  • Repository
  • 3 Watchers
  • 0 Stars
  • 1,469 Installations
  • PHP
  • 7 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 2 % Grown

The README.md

PhpCommons

Some common methods to ease the life of anonymous PHP developers, (*1)

String

  • startsWith Tests if a string starts with the specified prefix.
  • endsWith Tests if a string ends with the specified suffix
  • camelize Uppercases the first character of each word in a string
  • excerpt Creates an excerpt from a text based on a phrase
  • highlight Highlights (i.e. adds html-tags arround the keyword) a given keyword in a string

Array

  • insertElement Adds an element into a array on the given position without replacing the old entry
  • removeElementByValue Removes the given element from the array
  • mergeArrayValues Creates an array of arrays from the two given arrays.
  • getPrevKey Returns the previous key from an array
  • getNextKey Returns the next key from an array
  • applyCallbackByPath Applies a callback on a part of a multidimensional array defined by its path (i.e. keys)

Formatter

Byte

  • prettyPrintSize Pretty prints a given memory/file size (e.g. 1024 -> 1kB)

Time

  • prettyPrintMicroTimeInterval Pretty prints an interval specfied by two timestamps.
  • getRelativeTimeDifference Get the relative difference between a given start time and end time.

Build Status Coverage Status, (*2)

The Versions

02/11 2017

dev-develop

dev-develop http://www.stinger-soft.net

Some common php functions

  Sources   Download

Apache-2.0

The Requires

  • php >=5.4

 

The Development Requires

php commons

15/08 2016

dev-master

9999999-dev http://www.stinger-soft.net

Some common php functions

  Sources   Download

Apache-2.0

The Requires

  • php >=5.4

 

The Development Requires

php commons

15/08 2016

1.0.0

1.0.0.0 http://www.stinger-soft.net

Some common php functions

  Sources   Download

Apache-2.0

The Requires

  • php >=5.4

 

The Development Requires

php commons