A set of polyfillers for strings, arrays, etc. used by RQuadling's various projects
Using Composer:
composer require rquadling/polyfiller
- Arrays
array_filter_keys
- Filters elements of an array using a callback function, based upon the key.array_get
- Returns the requested value from an array based upon the key or the default value if the key does not exist.array_to_table
- Convert an array that fits a database result set into a plain text table.
- Classes
class_uses_recursive
- Returns all traits used by a class, its parent classes and trait of their traits.trait_uses_recursive
- Returns all traits used by a trait and its traits.
- Strings
mb_str_pad
- Multibyte String Pad.str_to_kebab_case
- Convert a string to kebab case.