PHPackages                             fabmesto/phputilities - 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. fabmesto/phputilities

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

fabmesto/phputilities
=====================

PHP utilities

2.2(1mo ago)042MITPHPPHP &gt;=7.1CI passing

Since Feb 13Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/fabmesto/phputilities)[ Packagist](https://packagist.org/packages/fabmesto/phputilities)[ RSS](/packages/fabmesto-phputilities/feed)WikiDiscussions main Synced 6d ago

READMEChangelog (10)Dependencies (2)Versions (15)Used By (0)

PHPUtilities
============

[](#phputilities)

[![CI](https://github.com/fabmesto/phputilities/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/fabmesto/phputilities/actions)[![Latest Release](https://camo.githubusercontent.com/3735267ab438f6d93df6206fd89f6aafda0185cbcea7c768fe52e2dff0c99313/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f6661626d6573746f2f7068707574696c6974696573)](https://github.com/fabmesto/phputilities/releases)[![Packagist](https://camo.githubusercontent.com/a65f1be2c27a07589cdbdf013f126fc932478b1888fbcb6f9f0ce59df14dcfd3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6661626d6573746f2f7068707574696c6974696573)](https://packagist.org/packages/fabmesto/phputilities)[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](LICENSE)

**PHPUtilities** è una collezione di funzioni utili per lo sviluppo PHP quotidiano: date, array, CSV, querystring e altro ancora.

---

🚀 Installazione
---------------

[](#-installazione)

Con Composer:

```
composer require fabmesto/phputilities
```

---

✨ Funzionalità
--------------

[](#-funzionalità)

### 📆 Date

[](#-date)

- `date_to_mysql($itDate)`
- `date_to_it($mysqlDate)`
- `invert_date($date)`
- `invert_date_zero($date)`
- `is_zero_date($date)`
- `now()` → `2025-07-08 12:34:56`

### 🧩 Array &amp; String

[](#-array--string)

- `arraymulti_to_keys_values($array, $keyField, $valueField)`
- `split_comune_provincia("Bari (BA)")` → `['comune' => 'Bari', 'provincia' => 'BA']`
- `value_by_key($array, $key)`

### 📄 File &amp; CSV

[](#-file--csv)

- `csv_to_array($filepath)` → parsing CSV

### 🌐 Query e parametri

[](#-query-e-parametri)

- `params_from_get($defaults)`
- `params_from_post($defaults)`
- `get_in_query_string($excludeKeys)`

---

🧪 Esempi
--------

[](#-esempi)

```
use fab\functions;

// Estrarre key => value da array multidimensionale
$data = [
    ['id' => 1, 'label' => 'Uno'],
    ['id' => 2, 'label' => 'Due'],
];

$res = functions::arraymulti_to_keys_values($data, 'id', 'label');
// Risultato: [1 => 'Uno', 2 => 'Due']
```

---

🧪 Testing
---------

[](#-testing)

Esegui PHPUnit:

```
composer test
```

Il pacchetto è testato con PHPUnit 10.

---

🔄 Integrazione CI
-----------------

[](#-integrazione-ci)

La libreria è testata automaticamente tramite GitHub Actions:

- su `push` e `pull_request` su `main`
- su PHP 8.2

File CI: `.github/workflows/ci.yml`

---

📦 Pubblicazione Packagist
-------------------------

[](#-pubblicazione-packagist)

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance94

Actively maintained with recent releases

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

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 ~157 days

Recently: every ~413 days

Total

13

Last Release

31d ago

Major Versions

1.9.1 → 2.02025-07-08

PHP version history (2 changes)v1.1PHP &gt;=5.3.0

2.0PHP &gt;=7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/43266be0756ba1df891054de8ae34b8c03b4a36a05a25064006bfda6b0ec23dd?d=identicon)[fabmesto](/maintainers/fabmesto)

---

Top Contributors

[![fabmesto](https://avatars.githubusercontent.com/u/17592373?v=4)](https://github.com/fabmesto "fabmesto (30 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/fabmesto-phputilities/health.svg)

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

###  Alternatives

[fieg/bayes

Implementation of Naive Bayes Classifier algorithm in PHP.

7394.1k](/packages/fieg-bayes)

PHPackages © 2026

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