PHPackages                             raphievila/utils - 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. raphievila/utils

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

raphievila/utils
================

PHP Swiss Knife - basic utilities for quick coding

1.0.3.x-dev(7y ago)051GPL-3.0PHPPHP ^5.3 || ^7.0

Since Jul 9Pushed 7y ago1 watchersCompare

[ Source](https://github.com/raphievila/utils)[ Packagist](https://packagist.org/packages/raphievila/utils)[ RSS](/packages/raphievila-utils/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (1)Dependencies (1)Versions (5)Used By (0)

Utils
=====

[](#utils)

Utils object is desinged as a swiss knife of functions that is normally used for simple tasks as converting decimals to string fractions, checking values, basic cross scripting and curl initializers with easy to remember arguments.

It requires xTags another piece of code to generate html tag structures with PHP object oriented methods.

To Install
----------

[](#to-install)

Using terminal, install with composer:

```
$> composer require raphievila/utils

```

USE
===

[](#use)

I've added some comments to the script that shows how to use each tool. There is no specific use for the tools, I mostly use them to help visually during developing and other little pieces of codes that can help you speed your coding.

To use the class just include where needed like so:

```
require 'directory-composer-is-located/vendor/autoload.php';
use Utils\Utils;

$u = new Utils();
```

Some Useful Examples
--------------------

[](#some-useful-examples)

#### Echo Array

[](#echo-array)

Echo array is a quick snipped of code that place an array or object inside a predefined tag, instead of constantly typing the whole code I just use:

```
$array = ['hello', 'world'];
echo $u->echo_array($array);
```

This will render as:

```

$array = Array(
    'hello',
    'world'
)

```

I also recently added `echo_text($string)` which renders a string into a text area `` tag.

### Current Site URL

[](#current-site-url)

Creating dynamic URLs is very useful for transporting site from one domain to another, instead of using static urls like `https://github.com`. With site\_url() method applied to all your links, will maintain this dynamic while redering a static full url. Only returns the main server name or domain.

Example:

```
use xTags\xTags;
$x = new xTags();

echo $x->p($u->site_url());
echo $x->a('Hello World', array('href' => $u->site_url() . "/hello-world"));
```

Renders:

```

http://example.com
Hello World

https://new-example.com
Hello World
```

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

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.

###  Release Activity

Cadence

Every ~197 days

Total

4

Last Release

2686d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6283126?v=4)[Rafael](/maintainers/raphievila)[@raphievila](https://github.com/raphievila)

---

Top Contributors

[![raphievila](https://avatars.githubusercontent.com/u/6283126?v=4)](https://github.com/raphievila "raphievila (23 commits)")

### Embed Badge

![Health badge](/badges/raphievila-utils/health.svg)

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

###  Alternatives

[rogervila/array-diff-multidimensional

Compare the difference between two multidimensional arrays

1134.8M14](/packages/rogervila-array-diff-multidimensional)

PHPackages © 2026

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