PHPackages                             janmensik/phphelpers - 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. janmensik/phphelpers

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

janmensik/phphelpers
====================

Pack of small helper functions for transformations input and outputs.

v1.0.1(10mo ago)00MITPHP

Since Jul 13Pushed 5mo agoCompare

[ Source](https://github.com/janmensik/phphelpers)[ Packagist](https://packagist.org/packages/janmensik/phphelpers)[ RSS](/packages/janmensik-phphelpers/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (3)Used By (0)

PHPHelpers
==========

[](#phphelpers)

PHPHelpers is a lightweight PHP library that provides a collection of utility functions to simplify common tasks such as string manipulation, data parsing, URL handling, and file system operations. It is designed to be easy to integrate and use in any PHP project.

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

[](#installation)

Install the library via Composer:

```
composer require janmensik/phphelpers
```

Usage
-----

[](#usage)

### Helpers Class

[](#helpers-class)

The `Helpers` class contains a variety of static methods for common tasks.

#### String Manipulation

[](#string-manipulation)

**`utf2ascii(string $string): string`**

Converts a UTF-8 encoded string to its ASCII equivalent, removing diacritics. This is particularly useful for handling Latin-1 and Czech characters.

```
use JanMensik\PHPHelpers\Helpers;

$asciiString = Helpers::utf2ascii('Příliš žluťoučký kůň');
// echo $asciiString; // "Prilis zlutoucky kun"
```

**`text2seolink(string $string): string`**

Transforms a string into a URL-friendly "slug" by converting it to lowercase, replacing non-alphanumeric characters with hyphens, and trimming any leading or trailing hyphens.

```
use JanMensik\PHPHelpers\Helpers;

$seoLink = Helpers::text2seolink('A sample title with various characters!');
// echo $seoLink; // "a-sample-title-with-various-characters"
```

#### Data Parsing

[](#data-parsing)

**`parseFloat(?string $str): ?float`**

Parses a floating-point number from a string, correctly handling commas as decimal separators and ignoring whitespace.

```
use JanMensik\PHPHelpers\Helpers;

$floatValue = Helpers::parseFloat('1 234,56');
// var_dump($floatValue); // float(1234.56)
```

**`parseDate(?string $data, bool $force = false): ?int`**

Parses a date string into a Unix timestamp. It supports various date formats and defaults to noon if no time is specified.

```
use JanMensik\PHPHelpers\Helpers;

$timestamp = Helpers::parseDate('15. 12. 2023 14:30');
// echo $timestamp; // A Unix timestamp corresponding to the given date and time
```

### UrlParameters Class

[](#urlparameters-class)

The `UrlParameters` class provides a simple and effective way to manipulate and construct URLs with query parameters.

#### Creating a URL

[](#creating-a-url)

You can create a new URL instance from a string or from the current request URI.

```
use JanMensik\PHPHelpers\UrlParameters;

// From a string
$url = new UrlParameters('https://example.com/path?param1=value1');

// From the current request
$currentUrl = new UrlParameters();
$currentUrl->fromCurrent();
```

#### Modifying Parameters

[](#modifying-parameters)

You can easily add, update, or remove query parameters.

```
$url->setParameter('param2', 'newValue'); // Adds or updates a parameter
$url->setParameter('param1', false); // Removes a parameter
```

#### Generating Output

[](#generating-output)

Once you have configured the URL, you can retrieve it as a string or as a complete HTML link.

```
$urlString = $url->getUrl();
// echo $urlString; // "https://example.com/path?param2=newValue"

$htmlLink = $url->getLink('Click Here', 'class="btn"');
// echo $htmlLink; // 'Click Here'
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance63

Regular maintenance activity

Popularity0

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 80% 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 ~0 days

Total

2

Last Release

309d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f8e2f235afd31971fc0916bfa2e4f4d666fb39dc18f9468931af6746d32bc9c2?d=identicon)[janmensik](/maintainers/janmensik)

---

Top Contributors

[![janmensik](https://avatars.githubusercontent.com/u/200337?v=4)](https://github.com/janmensik "janmensik (4 commits)")[![google-labs-jules[bot]](https://avatars.githubusercontent.com/in/842251?v=4)](https://github.com/google-labs-jules[bot] "google-labs-jules[bot] (1 commits)")

### Embed Badge

![Health badge](/badges/janmensik-phphelpers/health.svg)

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

###  Alternatives

[lionix/seo-manager

SEO Manager for Laravel Framework

2165.4k](/packages/lionix-seo-manager)

PHPackages © 2026

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