Collection of random helper QoLfunctions for PHP.
A collection of random quality of life functions for PHP – a sort of toolbox.
There are not many requirements for this library; infact, the only true requirement is PHP, but if you plan to contribute, having GNU Make installed will make for nicer dev experience than without.
|Make (dev only)||
Nothing much to do but require the library in your own project's composer dependencies!
$ composer require jordanbrauer/phelpers
Once you have the library installed, head over to the list of available functions to shop around.
- Start by cloning the project to your own machine.
- Move yourself into the newly cloned repository directory.
- Run make to install dev dependencies.
$ git clone https://github.com/jordanbrauer/phelpers.git \ && cd ./phelpers \ && make vendor \ && make;
As mentioned in the Requirements section of this document, having GNU Make installed on your system will make for nice development experience while contributing. To get started, run Make without any targets or arguments:
And you will be greeted with the list of targets for this project!
Usage: make [target] [arg="val"...] Targets: analysis Run analysis help Show this help message repl Start a REPL instance and interact with the library test Run tests vendor Install vendor dependencies
$ make repl
Using the functions is easy – just make sure that you preface your functions with the projects namespace first.
λ Phelpers\is_console() # true λ Phelpers\is_web() # false