2017 © Pedro Peláez
 

library php-utils

A collection of functions that provide basic PHP utility functionality.

image

zeek/php-utils

A collection of functions that provide basic PHP utility functionality.

  • Tuesday, June 26, 2018
  • by zeek
  • Repository
  • 1 Watchers
  • 1 Stars
  • 661 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 157 % Grown

The README.md

PHP Utils

, (*1)

Purpose

Utility functions to help alleviate some common use cases., (*2)

Safe Read

safe_read( $item, $key )

Useful for accessing something without having to wrap it with empty or isset checks constantly., (*3)

Returns false if it's unable to find the item. Works with both objects and arrays., (*4)

Is Constant True

is_constant_true( $constant )

Checks the following in order: * Constant is defined * Constant is true, (*5)

Helpful to avoid always having to check if the constant is defined before checking the value., (*6)

Returns either true or false., (*7)

Get File

get_file( $filename, $extension )

Checks that the file exists and is readable., (*8)

Allowable file types are: * xml * sql * txt * json, (*9)

Returns the data of the file or false if it failed., (*10)

Recursively Remove Directory

rrmdir( $dir )

Recursively delete a directory and all files and directories inside it., (*11)

This is useful because PHP's rmdir does not delete a directory if anything exists inside of it., (*12)

Format Currency

Formats the given value with two decimal places, prefixed with a dollar sign., (*13)

format_currency( 1.5 )
// $1.50

The Versions

26/06 2018

dev-master

9999999-dev

A collection of functions that provide basic PHP utility functionality.

  Sources   Download

proprietary

The Requires

  • php >=5.6

 

The Development Requires

26/06 2018

2.1

2.1.0.0

A collection of functions that provide basic PHP utility functionality.

  Sources   Download

proprietary

The Requires

  • php >=5.6

 

The Development Requires

24/03 2018

2.0

2.0.0.0

A collection of functions that provide basic PHP utility functionality.

  Sources   Download

proprietary

The Requires

  • php >=5.6

 

The Development Requires

28/02 2018

1.0

1.0.0.0

A collection of functions that provide utility functionality.

  Sources   Download

proprietary

The Requires

  • php >=5.6