PHPackages                             hylin/miniutils - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. hylin/miniutils

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

hylin/miniutils
===============

A collection of useful functions.

01.1kPHP

Since Sep 5Pushed 8y ago1 watchersCompare

[ Source](https://github.com/Hy369/MiniUtils)[ Packagist](https://packagist.org/packages/hylin/miniutils)[ RSS](/packages/hylin-miniutils/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (1)Used By (0)

MiniUtils
=========

[](#miniutils)

A collection of useful functions that implemented as classes.

[![Build Status](https://camo.githubusercontent.com/5ce52851a0b27e9a25816667dbf35ba17fc7c2bef9e533fa298f95b74843982e/68747470733a2f2f7472617669732d63692e6f72672f48793336392f4d696e695574696c732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Hy369/MiniUtils) [![Coverage Status](https://camo.githubusercontent.com/bbfbcae8543f18b23cf9d7058262dea4de2321c8be9aca966a6fe78ad8c5ca27/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f48793336392f4d696e695574696c732f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/Hy369/MiniUtils?branch=master) [![Total Downloads](https://camo.githubusercontent.com/15c2690dcb56d468294fce78404d3c505746fa98bd3e52fe5980a5e0b81da3de/68747470733a2f2f706f7365722e707567782e6f72672f68796c696e2f6d696e697574696c732f646f776e6c6f616473)](https://packagist.org/packages/hylin/miniutils) [![Latest Unstable Version](https://camo.githubusercontent.com/bc70d84fa80e2d2b951e4f6b125bee080c8f8a35262d7a01e02cc927d3f1ff52/68747470733a2f2f706f7365722e707567782e6f72672f68796c696e2f6d696e697574696c732f762f756e737461626c65)](https://packagist.org/packages/hylin/miniutils) [![License](https://camo.githubusercontent.com/612421a52088fc7f41142f2fa48ffbaee30f1510fb8f34d923dfa70484205b10/68747470733a2f2f706f7365722e707567782e6f72672f68796c696e2f6d696e697574696c732f6c6963656e7365)](https://packagist.org/packages/hylin/miniutils)

Links
-----

[](#links)

- Document:

Installation
------------

[](#installation)

```
composer require hylin/miniutils

```

Usage
-----

[](#usage)

### MuString

[](#mustring)

#### utf8ToUnicode

[](#utf8tounicode)

Convert character from UTF-8 to Unicode.

##### Description

[](#description)

```
string utf8ToUnicode(string $str[, string $prefix = '\\u'[, string $suffix = ''[,
bool $reserveAscii = true]]])

```

##### Parameters

[](#parameters)

**str**

The string to be converted.

**prefix**

The prefix of string to be converted, the default is \\u

**suffix**

The suffix of string to be converted, the default is empty string.

**reserveAscii**

Whether the ascii character will be converted or not.

#### unicodeToUtf8

[](#unicodetoutf8)

```
string unicodeToUtf8(string $str[, string $prefix = '\\u'[, string $suffix = '']])

```

#### replaceSuffix

[](#replacesuffix)

```
string replaceSuffix(string $str, string $suffix)

```

#### getSuffix

[](#getsuffix)

```
string getSuffix($str[, $withDot = false])

```

### MuArray

[](#muarray)

#### keyMap

[](#keymap)

```
void function keyMap(array &$array, callable $callback)

```

#### merge

[](#merge)

```
void merge(&$array1, ...$array2)

```

#### multiSort

[](#multisort)

```
void multiSort(&$array, $key[, $order = SORT_ASC[, $maintainIndex = false]])

```

### MuDate

[](#mudate)

#### timestampToUtc

[](#timestamptoutc)

```
string timestampToUtc(int $timestamp[, bool $minTime = false])

```

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/12755772?v=4)[Hylin Yin](/maintainers/Hy369)[@Hy369](https://github.com/Hy369)

---

Top Contributors

[![Hy369](https://avatars.githubusercontent.com/u/12755772?v=4)](https://github.com/Hy369 "Hy369 (42 commits)")

### Embed Badge

![Health badge](/badges/hylin-miniutils/health.svg)

```
[![Health](https://phpackages.com/badges/hylin-miniutils/health.svg)](https://phpackages.com/packages/hylin-miniutils)
```

###  Alternatives

[christiankuri/laravel-favorite

Allows Laravel Eloquent models to implement a 'favorite' or 'remember' or 'follow' feature.

226479.8k6](/packages/christiankuri-laravel-favorite)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
