2017 © Pedro Peláez
 

library utilphp

util.php is a collection of useful functions and snippets that you need or could use every day, designed to avoid conflicts with existing projects

image

brandonwamboldt/utilphp

util.php is a collection of useful functions and snippets that you need or could use every day, designed to avoid conflicts with existing projects

  • Friday, February 19, 2016
  • by brandonwamboldt
  • Repository
  • 75 Watchers
  • 1047 Stars
  • 230,164 Installations
  • PHP
  • 10 Dependents
  • 0 Suggesters
  • 132 Forks
  • 11 Open issues
  • 7 Versions
  • 5 % Grown

The README.md

Util.php Build Status Coverage Status

UtilPHP (Aka util.php) is a collection of useful functions and snippets that you need or could use every day. It's implemented as a class with static methods, to avoid conflicts with your existing code-base. Just drop it in and start using it immediately., (*1)

Included are 55+ functions that provide you with the ability to do common tasks much easier and more efficiently, without having to find that one comment on php.net where you know it's been done already. Access superglobals without checking to see if certain indexes are set first and pass default values, use a nicely formatted var dump, validate emails, generate random strings, flatten an array, pull a single column out of a multidimensional array and much more., (*2)

Although it's implemented as one giant class, util.php has extensive documentation and a full suite of unit tests to avoid breaking backwards-compatibility unintentionally., (*3)

Release Information

This repo contains in development code for future releases as well as the current stable branch. Development code is contained in the develop branch., (*4)

Changelog and New Features

You can find a list of all changes for each release in the official documentation, (*5)

Installation

Server Requirements

  • PHP version 5.3.3 or higher.

Standalone File

Simply drop util.php in any project and call include 'util.php'; in your project. You can then access the Util class., (*6)

Composer

Add the following dependency to your composer.json:, (*7)

"brandonwamboldt/utilphp": "1.0.*"

When used with composer, the class is namespaced (\utilphp\util) instead of just util., (*8)

Contributing

UtilPHP is a community driven project and accepts contributions of code and documentation from the community. These contributions are made in the form of Issues or Pull Requests on the UtilityPHP repository on GitHub., (*9)

Issues are a quick way to point out a bug. If you find a bug or documentation error in UtilityPHP then please check a few things first:, (*10)

  • There is not already an open Issue
  • The issue has already been fixed (check the develop branch, or look for closed Issues)
  • Is it something really obvious that you fix it yourself?

Reporting issues is helpful but an even better approach is to send a Pull Request, which is done by "Forking" the main repository and committing to your own copy. This will require you to use the version control system called Git., (*11)

Guidelines

Before we look into how, here are the guidelines. If your Pull Requests fail to pass these guidelines it will be declined and you will need to re-submit when you’ve made the changes. This might sound a bit tough, but it is required for me to maintain quality of the code-base., (*12)

PHP Style

Please ensure all new contributions match the PSR-2 coding style guide., (*13)

Documentation

If you change anything that requires a change to documentation then you will need to add it. New methods, parameters, changing default values, adding constants, etc are all things that will require a change to documentation. The change-log must also be updated for every change. Also PHPDoc blocks must be maintained., (*14)

PHP Version Compatibility

UtilityPHP is compatible with PHP 5.3.3 so all code supplied must stick to this requirement., (*15)

Of particular note is avoiding short array notation like this:, (*16)

$var = [];

Please use the old notation instead:, (*17)

$var = array();

I know it's uglier, but PHP 5.3 while EOL'd, still isn't that old., (*18)

Branching

One thing at a time: A pull request should only contain one change. That does not mean only one commit, but one change - however many commits it took. The reason for this is that if you change X and Y but send a pull request for both at the same time, we might really want X but disagree with Y, meaning we cannot merge the request. Using the Git-Flow branching model you can create new branches for both of these features and send two requests., (*19)

License

UtilPHP is licensed under the MIT license., (*20)

Resources

The Versions

19/02 2016

dev-master

9999999-dev https://github.com/brandonwamboldt/utilphp

util.php is a collection of useful functions and snippets that you need or could use every day, designed to avoid conflicts with existing projects

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

by Brandon Wamboldt

helpers php collection utility

02/02 2015

1.1.x-dev

1.1.9999999.9999999-dev https://github.com/brandonwamboldt/utilphp

util.php is a collection of useful functions and snippets that you need or could use every day, designed to avoid conflicts with existing projects

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

by Brandon Wamboldt

helpers php collection utility

02/02 2015

1.1.0

1.1.0.0 https://github.com/brandonwamboldt/utilphp

util.php is a collection of useful functions and snippets that you need or could use every day, designed to avoid conflicts with existing projects

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

by Brandon Wamboldt

helpers php collection utility

24/01 2015

1.0.x-dev

1.0.9999999.9999999-dev https://github.com/brandonwamboldt/utilphp

util.php is a collection of useful functions and snippets that you need or could use every day, designed to avoid conflicts with existing projects

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

by Brandon Wamboldt

helpers php collection utility

24/01 2015

1.0.7

1.0.7.0 https://github.com/brandonwamboldt/utilphp

util.php is a collection of useful functions and snippets that you need or could use every day, designed to avoid conflicts with existing projects

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

by Brandon Wamboldt

helpers php collection utility

06/02 2014

1.0.6

1.0.6.0 https://github.com/brandonwamboldt/utilphp

util.php is a collection of useful functions and snippets that you need or could use every day, designed to avoid conflicts with existing projects

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

by Brandon Wamboldt

helpers php collection utility

28/10 2013

1.0.5

1.0.5.0 https://github.com/brandonwamboldt/utilphp

util.php is a collection of useful functions and snippets that you need or could use every day, designed to avoid conflicts with existing projects

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

by Brandon Wamboldt

helpers php collection utility