PHPackages                             amidesfahani/farsi-helper - 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. amidesfahani/farsi-helper

ActiveLibrary

amidesfahani/farsi-helper
=========================

Persian Helper Class for PHP &amp; Laravel

v1.0.0(2y ago)014MITPHPPHP ^7.0|^7.1|^7.2|^8.0|^8.1

Since Oct 24Pushed 2y ago1 watchersCompare

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

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

Installation
============

[](#installation)

```
composer require amidesfahani/farsi-helper

```

Usage
=====

[](#usage)

بررسی اعداد و کاراکترهای فارسی
------------------------------

[](#بررسی-اعداد-و-کاراکترهای-فارسی)

```
FarsiHelper::isPersianAlpha($inputStr);
FarsiHelper::isPersianNum($inputStr);
FarsiHelper::isPersianAlphaNum($inputStr);

```

تبدیل اعداد فارسی به انگلیسی
----------------------------

[](#تبدیل-اعداد-فارسی-به-انگلیسی)

```
FarsiHelper::FarsiNumbersToEnglish($codeMelli);

// short version
FarsiHelper::toEnNumber($codeMelli);

```

جایگزین اعداد عربی با فارسی
---------------------------

[](#جایگزین-اعداد-عربی-با-فارسی)

```
FarsiHelper::RemoveArabian($codeMelli);

```

اعتبار سنجی کد ملی
------------------

[](#اعتبار-سنجی-کد-ملی)

```
FarsiHelper::isMelliCode($codeMelli);

```

تبدیل «کاف» عربی (ك) به فارسی (ک)
---------------------------------

[](#تبدیل-کاف-عربی-ك-به-فارسی-ک)

```
FarsiHelper::convertKa($inputStr);

```

تبدیل «ی» عربی (ي) به فارسی (ی)
-------------------------------

[](#تبدیل-ی-عربی-ي-به-فارسی-ی)

```
FarsiHelper::convertYa($inputStr);

```

تبدیل اعداد عربی به فارسی
-------------------------

[](#تبدیل-اعداد-عربی-به-فارسی)

```
FarsiHelper::convertArabicNum($inputStr);

```

تبدیل اعداد انگلیسی به فارسی
----------------------------

[](#تبدیل-اعداد-انگلیسی-به-فارسی)

```
FarsiHelper::convertEnglishNum($inputStr);

```

اصلاح ممیز اعشار فارسی
----------------------

[](#اصلاح-ممیز-اعشار-فارسی)

```
FarsiHelper::convertDecimalSeparator($inputStr);

```

تنظیم میله‌فاصله اطراف پرانتز، آکولاد و کروشه
---------------------------------------------

[](#تنظیم-میله‌فاصله-اطراف-پرانتز-آکولاد-و-کروشه)

```
FarsiHelper::convertParenthesisSpace($inputStr);

```

تنظیم میله‌فاصله اطراف علامت انتهای جمله (نقطه، سوال و تعجب)
------------------------------------------------------------

[](#تنظیم-میله‌فاصله-اطراف-علامت-انتهای-جمله-نقطه-سوال-و-تعجب)

```
FarsiHelper::convertPunctuationSpace($inputStr);

```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

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

Unknown

Total

1

Last Release

931d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5d9ed461878eff3be19c9bfd4158e246a2a02f3728fa9589d8d48b61867fc2b0?d=identicon)[amidesfahani](/maintainers/amidesfahani)

---

Top Contributors

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

---

Tags

phplaravelpersianfarsi

### Embed Badge

![Health badge](/badges/amidesfahani-farsi-helper/health.svg)

```
[![Health](https://phpackages.com/badges/amidesfahani-farsi-helper/health.svg)](https://phpackages.com/packages/amidesfahani-farsi-helper)
```

###  Alternatives

[sadegh19b/laravel-persian-validation

A comprehensive Laravel validation package for Persian text, numbers, dates, and Iranian national identifiers

18293.8k1](/packages/sadegh19b-laravel-persian-validation)[iamfarhad/validation

🇮🇷 Complete Laravel Persian validation package - Iranian national ID, mobile numbers, Shamsi dates, IBAN/Sheba, postal codes &amp; more. Modern Laravel 10-12 support with both ValidationRule objects &amp; string-based rules.

2917.3k](/packages/iamfarhad-validation)

PHPackages © 2026

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