blok/utils

A series of utilites functions for PHP

Maintainers

Details

github.com/blok/utils

Source

Issues

Installs: 7 462

Dependents: 5

Suggesters: 0

Security: 0

Stars: 0

Watchers: 3

Forks: 0

Open Issues: 0

pkg:composer/blok/utils

1.2.1 2022-06-20 15:19 UTC

This package is auto-updated.

Last update: 2025-09-20 22:40:25 UTC


README

Packagist Packagist Packagist

Utilities script for PHP projects

Installation

Install via composer

composer require blok/utils

Usage

Arr

Blok\Utils\Arr is a bunch of array related methods utilities that you can use as static call exemple :

Blok\Utils\Arr::csvToArray('xxx.csv')

Will transform a csv file to an array

Str

Blok\Utils\Str is a bunch of String related methods utilities that you can use as static call exemple :

Str::smrtr('{hello} world', ["hello", "Hello"])

Will replace the braced {hello} with the value of the array

Utils

Blok\Utils\Utils is a bunch of common PHP utils methods that you can use as static call exemple :

Utils::getJSON("xxx.json"")

Will make a file_get_contents + a json_decode

Utils::removeSubfolder($your_dir, ".git"")

Will remove all the .git folder.

Security

If you discover any security related issues, please email instead of using the issue tracker.

Credits