PHPackages                             cse/helpers-word - 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. [Framework](/categories/framework)
4. /
5. cse/helpers-word

ActiveLibrary[Framework](/categories/framework)

cse/helpers-word
================

The helpers allows you to modify string data. Inclination, transliterate, convert month date and convert number or amount to word - all this is available in this library.

1.0.6(7y ago)787431MITPHPPHP &gt;=7.1

Since Jan 13Pushed 7y ago3 watchersCompare

[ Source](https://github.com/cs-eliseev/helpers-word)[ Packagist](https://packagist.org/packages/cse/helpers-word)[ Docs](https://github.com/cs-eliseev/helpers-word)[ RSS](/packages/cse-helpers-word/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (1)Versions (10)Used By (1)

English | [Русский](https://github.com/cs-eliseev/helpers-word/blob/master/README.ru_RU.md)

WORD CSE HELPERS
================

[](#word-cse-helpers)

[![Travis (.org)](https://camo.githubusercontent.com/433ae5b13fe14c2c2a40ad0d83b96c2779ec2fac3a36aa138d9958b083ca56a1/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f63732d656c69736565762f68656c706572732d776f72642e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/cs-eliseev/helpers-word)[![Codecov](https://camo.githubusercontent.com/187f97bef932d11dfb9011569c42aacc316e20ca64c8208d8e6745f8809f7791/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f63732d656c69736565762f68656c706572732d776f72642e7376673f7374796c653d666c61742d737175617265)](https://codecov.io/gh/cs-eliseev/helpers-word)[![Scrutinizer code quality](https://camo.githubusercontent.com/2fa7a4143177714116fe1214fc5f5cf16ecece7a93dc1d54ea05fe9b19873ac7/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f63732d656c69736565762f68656c706572732d776f72642e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/cs-eliseev/helpers-word/?branch=master)

[![Packagist](https://camo.githubusercontent.com/0ebe1cd9d15377bd5d54e2cd98951fce38eb317480c7b2b983d22550c03cf75d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6373652f68656c706572732d776f72642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cse/helpers-word)[![Minimum PHP Version](https://camo.githubusercontent.com/dcd4b4aec2c1709157fa6a2c050f709d75cde9552a79cfff0b70a97fad7281ae/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230372e312d3838393242462e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cse/helpers-word)[![Packagist](https://camo.githubusercontent.com/8f80dc07a5899c3bd2675c28636c4cadc6f554f80eb8fe377bbfe742f0914e48/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6373652f68656c706572732d776f72642e7376673f7374796c653d666c61742d737175617265)](https://github.com/cs-eliseev/helpers-word/blob/master/LICENSE.md)[![GitHub repo size](https://camo.githubusercontent.com/9cd3c188b198d28d915b9d4abe6b64522cc28068693f373b34e5924019e51f66/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7265706f2d73697a652f63732d656c69736565762f68656c706572732d776f72642e7376673f7374796c653d666c61742d737175617265)](https://github.com/cs-eliseev/helpers-word/archive/master.zip)

The helpers allows you to modify string data. Inclination, transliterate, convert month date and convert number or amount to word - all this is available in this library.

Project repository:

**DEMO**

```
$number = 21;
Word::getInclinationByNumber(
    $number,
    ['котик', 'котика', 'котиков'],
    'мурлычит ' . Word::convertUnsignedIntNumberToWord($number) . ' '
);
// мурлычит двадцать один котик
```

---

Introduction
------------

[](#introduction)

[CSE HELPERS](https://github.com/cs-eliseev/helpers/blob/master/README.md) is a collection of several libraries with simple functions written in PHP for people.

Despite using PHP as the main programming language for the Internet, its functions are not enough. WORD CSE HELPERS solves the problem: word inclination, word transliteration, number or sum conversion to a word, etc.

[CSE HELPERS](https://github.com/cs-eliseev/helpers/blob/master/README.md) was created for the rapid development of web applications.

**CSE Helpers project:**

- [Array CSE helpers](https://github.com/cs-eliseev/helpers-arrays)
- [Cookie CSE helpers](https://github.com/cs-eliseev/helpers-cookie)
- [Date CSE helpers](https://github.com/cs-eliseev/helpers-date)
- [Email CSE helpers](https://github.com/cs-eliseev/helpers-email)
- [IP CSE helpers](https://github.com/cs-eliseev/helpers-ip)
- [Json CSE helpers](https://github.com/cs-eliseev/helpers-json)
- [Math Converter CSE helpers](https://github.com/cs-eliseev/helpers-math-converter)
- [Phone CSE helpers](https://github.com/cs-eliseev/helpers-phone)
- [Request CSE helpers](https://github.com/cs-eliseev/helpers-request)
- [Session CSE helpers](https://github.com/cs-eliseev/helpers-session)
- [Word CSE helpers](https://github.com/cs-eliseev/helpers-word)

Below you will find some information on how to init library and perform common commands.

Install
-------

[](#install)

You can find the most recent version of this project [here](https://github.com/cs-eliseev/helpers-word).

### Composer

[](#composer)

Execute the following command to get the latest version of the package:

```
composer require cse/helpers-word
```

Or file composer.json should include the following contents:

```
{
    "require": {
        "cse/helpers-word": "*"
    }
}
```

### Git

[](#git)

Clone this repository locally:

```
git clone https://github.com/cs-eliseev/helpers-word.git
```

### Download

[](#download)

[Download the latest release here](https://github.com/cs-eliseev/helpers-word/archive/master.zip).

Usage
-----

[](#usage)

The class consists of static methods that are conveniently used in any project. See example [examples-word.php](https://github.com/cs-eliseev/helpers-word/blob/master/examples/examples-word.php).

**Convert string to UTF-8**

Example default charset(CP1251):

```
$text = mb_convert_encoding('привет', 'CP1251');
Word::stringToUtf($text);
// привет
```

Set charset:

```
$text = mb_convert_encoding('привет', 'KOI8-R');
Word::stringToUtf($text, 'KOI8-R');
// привет
```

**Date month to word converter**

Example:

```
Word::convertDateMonthToWord('2019-01-01');
// 01 января 2019
```

Add delimiter to result:

```
Word::convertDateMonthToWord('05.05.2018', '/');
// 05/мая/2018
```

**Inclination**

Example:

```
Word::getInclinationByNumber(10, ['котик', 'котика', 'котиков']);
// котиков
```

Add number:

```
Word::getInclinationByNumber(0, ['%d котик', '%d котика', '%d котиков']);
// 0 котиков
```

Add string number to text:

```
Word::getInclinationByNumber('01', ['был %d котик', 'было %d котика', 'было %d котиков']);
// был 1 котик
```

Add text prefix:

```
   Word::getInclinationByNumber(4, ['котик', 'котика', 'котиков'], 'еще %d ');
// еще 4 котика
```

**Text transliterate**

Example:

```
Word::transliterate('12 пользователей online');
// 12 polzovateley online
```

**Convert number to word**

Example:

```
Word::convertUnsignedIntNumberToWord(0);
// ноль
Word::convertUnsignedIntNumberToWord('1001');
// одна тысяча один
```

Change ones inclination:

```
Word::convertUnsignedIntNumberToWord(2002, 0);
// две тысячи двe
```

**Convert amount to word**

Example:

```
Word::convertAmountToWord(0);
// ноль рублей 0 копеек
```

Cents example:

```
Word::convertAmountToWord('1001.1');
// одна тысяча один рубль 10 копеек
Word::convertAmountToWord(2012.01);
// две тысячи двенадцать рублей 01 копейка
```

Cents to word example:

```
Word::convertAmountToWord(87654.02, true, true);
// восемьдесят семь тысяч шестьсот пятьдесят четыре рубля две копейки
```

Ignore zero cents:

```
Word::convertAmountToWord('1098765.00', false);
// один миллион девяносто восемь тысяч семьсот шестьдесят пять рублей
```

**CamelCase converter**

Example:

```
Word::camelCase('example-word');
// ExampleWord
```

Revert CamelCase:

```
Word::camelCase('ExampleWord', true);
// example-word
```

Change delimiter:

```
Word::camelCase('ExampleWord', true, '/');
// example/word
```

Testing &amp; Code Coverage
---------------------------

[](#testing--code-coverage)

PHPUnit is used for unit testing. Unit tests ensure that class and methods does exactly what it is meant to do.

General PHPUnit documentation can be found at .

To run the PHPUnit unit tests, execute:

```
phpunit PATH/TO/PROJECT/tests/
```

If you want code coverage reports, use the following:

```
phpunit --coverage-html ./report PATH/TO/PROJECT/tests/
```

Used PHPUnit default config:

```
phpunit --configuration PATH/TO/PROJECT/phpunit.xml
```

Donating
--------

[](#donating)

You can support this project [here](https://www.paypal.me/cseliseev/10usd). You can also help out by contributing to the project, or reporting bugs. Even voicing your suggestions for features is great. Anything to help is much appreciated.

License
-------

[](#license)

The WORD CSE HELPERS is open-source PHP library licensed under the MIT license. Please see [License File](https://github.com/cs-eliseev/helpers-word/blob/master/LICENSE.md) for more information.

---

> GitHub [@cs-eliseev](https://github.com/cs-eliseev)

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity61

Established project with proven stability

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

Total

9

Last Release

2573d ago

Major Versions

0.8.1 → 1.0.02019-01-18

### Community

Maintainers

![](https://www.gravatar.com/avatar/d3b9e49d0ce3fd71c8eb31b7c14e48373dbb415a9d16950ce52d23bf89b2ae26?d=identicon)[ak\_eliseev](/maintainers/ak_eliseev)

---

Top Contributors

[![cs-eliseev](https://avatars.githubusercontent.com/u/24221291?v=4)](https://github.com/cs-eliseev "cs-eliseev (92 commits)")

---

Tags

collectioncollectionscseframeworkhelperhelpersinclinationlibrarynumber2wordphptexttooltoolstransliterationutilitiesutilityutilswordframeworkhelperstringutilityhelperslibrarytoolconverterwordstringswordscollectioncollectionstexttoolsutilsutilitiestransliteratecsetextsinclination

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/cse-helpers-word/health.svg)

```
[![Health](https://phpackages.com/badges/cse-helpers-word/health.svg)](https://phpackages.com/packages/cse-helpers-word)
```

###  Alternatives

[cse/helpers-session

The helpers allows you to easily manage session data. START, SET, GET DELETE, HAS method session - all this is available in this library.

102.6k3](/packages/cse-helpers-session)[jbzoo/utils

Collection of PHP functions, mini classes and snippets for everyday developer's routine life.

8321.5M36](/packages/jbzoo-utils)[dragon-code/support

Support package is a collection of helpers and tools for any project.

238.7M101](/packages/dragon-code-support)

PHPackages © 2026

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