Several useful PHP functions
PHP JavaScript
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
tests
.gitattributes
.gitignore
LICENSE.txt
README.md
composer.json
gulpfile.js
package.json

README.md

Funktions 0.2.5

Funktions is a set of functions that I found useful in several of my projects. Feel free to fork and add yours ;)

Install

Pick up the source or install it with Composer :

composer require pyrsmk/funktions

Available functions by bundle

array.php

  • array_merge_recursive_unique($array1,$array2,...) : works like array_merge_recursive() PHP function but does not append values of the same key into an array, it instead overwrites the value as expected

color.php

  • rgb2hsl($r,$g,$b)
  • hsl2rgb($h,$s,$l)
  • rgb2hsv($r,$g,$b)
  • hsv2rgb($h,$s,$v)
  • rgb2html($r,$g,$b)
  • html2rgb($html)

system.php

  • debug($variable) : prints formatted informations about a variable
  • getimagesizefast($path) : get fast the local/remote image size
  • human_filesize($path) : get the human-readable size of a file
  • human_fileperms($path) : get human-readable file permissions (like drwxr-xr-x)
  • lessdir($path) : scan a directory without returning dot directories (the well-known . and ..)
  • mimetype($path) : get the mime type of a local or remote file
  • rrmdir(path) : remove a directory recursively

License

Funktions is released under the MIT license.