PHPackages                             saber13812002/persian-php - 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. saber13812002/persian-php

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

saber13812002/persian-php
=========================

Set of functionalities enable Arabic website developers to serve professional search, present and process Arabic content in PHP

v9(4y ago)14LGPL-3.0PHPPHP &gt;=5.6.0

Since Feb 9Pushed 4y agoCompare

[ Source](https://github.com/saber13812002/persian-php)[ Packagist](https://packagist.org/packages/saber13812002/persian-php)[ Docs](https://github.com/khaled-alshamaa/ar-php)[ RSS](/packages/saber13812002-persian-php/feed)WikiDiscussions master Synced 1mo ago

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

[![](https://camo.githubusercontent.com/1609f72099ac8a47133d9716800c298ccd9d4066060c8456b5bf55ecb26b398e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c616e6775616765732f746f702f6b68616c65642d616c7368616d61612f61722d706870)](https://www.php.net/) [![](https://camo.githubusercontent.com/84ebfb30e8ad23074dacebcd5afaeaa3b228fee4b4ce848e8f4f1f65b65b6281/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6b68616c65642e616c7368616d61612f61722d706870)](https://www.php.net/manual/en/migration54.php) [![](https://camo.githubusercontent.com/b59a18ba34a9adb0961105c5b8e52fbb680c69df78a9fc9e99ff91f6537fbe58/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f6b68616c65642d616c7368616d61612f61722d706870)](https://github.com/khaled-alshamaa/ar-php/releases/tag/v5.1.0) [![](https://camo.githubusercontent.com/7b4a2b77a0f1fac74fe6f1a6b1f065c6b1b9caebcee2aa33a38f4145bb191602/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652d646174652f6b68616c65642d616c7368616d61612f61722d706870)](https://github.com/khaled-alshamaa/ar-php/tags) [![](https://camo.githubusercontent.com/698514dbf3373ca247f959a84ee753e3b0dd58ab57759a1de520e0bb4ffecee6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6b68616c65642e616c7368616d61612f61722d706870)](https://www.gnu.org/licenses/lgpl-3.0.en.html) [![](https://camo.githubusercontent.com/5c984f9342543fce40ca0e1dc021dddaf6bcd64cfafd2093cd9816fbef3f9a4d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b68616c65642e616c7368616d61612f61722d706870)](https://packagist.org/packages/khaled.alshamaa/ar-php/stats) [![](https://camo.githubusercontent.com/3e70364057f0c243c2125474282ca441fc78d4c222fb6232e31b28c27b8d2763/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f73746172732f6b68616c65642e616c7368616d61612f61722d706870)](https://github.com/khaled-alshamaa/ar-php/stargazers) [![](https://camo.githubusercontent.com/420e3c0d30f595efe57f289c60c7fe285693c8aef0927b6d076ee7cba16cfe9a/68747470733a2f2f686974732e736565796f756661726d2e636f6d2f6170692f636f756e742f696e63722f62616467652e7376673f75726c3d68747470732533412532462532466769746875622e636f6d2532466b68616c65642d616c7368616d616125324661722d70687026636f756e745f62673d253233373943383344267469746c655f62673d2532333535353535352669636f6e3d2669636f6e5f636f6c6f723d253233453745374537267469746c653d6869747326656467655f666c61743d66616c7365)](https://hits.seeyoufarm.com)

[![](https://camo.githubusercontent.com/04740ec38da06680d144ee3e09bf1d8a327eae4b4a00641eced80965a3d9b77f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732d7261772f6b68616c65642d616c7368616d61612f61722d706870)](https://github.com/khaled-alshamaa/ar-php/issues) [![](https://camo.githubusercontent.com/5828ddb4244f30e4d16c6a8933aefb1f2aea7e655aa275d1d4bf497591dd40e4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c616e6775616765732f636f64652d73697a652f6b68616c65642d616c7368616d61612f61722d706870)](https://camo.githubusercontent.com/5828ddb4244f30e4d16c6a8933aefb1f2aea7e655aa275d1d4bf497591dd40e4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c616e6775616765732f636f64652d73697a652f6b68616c65642d616c7368616d61612f61722d706870) [![](https://camo.githubusercontent.com/493b4528db5c3e4bcb6ddb3b4b5194be7c74f302dd96acb2cce5a056a68a4c53/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6d6d69742d61637469766974792f6d2f6b68616c65642d616c7368616d61612f61722d706870)](https://github.com/khaled-alshamaa/ar-php/commits/master) [![](https://camo.githubusercontent.com/2fb84eee8885145eae56f8ffedefb20c8c3444b2e86eb4962d748faf6bdd5281/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6173742d636f6d6d69742f6b68616c65642d616c7368616d61612f61722d706870)](https://github.com/khaled-alshamaa/ar-php/commits/master) [![](https://camo.githubusercontent.com/381e72cb9f0fa7f459123318f1c2d0e3e314ae385298069525151426ede0050b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f6b68616c65642d616c7368616d61612f61722d7068703f7374796c653d736f6369616c)](https://github.com/khaled-alshamaa/ar-php/network/members) [![](https://camo.githubusercontent.com/f7ea17b10e35efa8b808be439771268eeeaa24c252348ad290a0dcf8d4ef55a7/68747470733a2f2f696d672e736869656c64732e696f2f747769747465722f666f6c6c6f772f61727068703f7374796c653d736f6369616c)](https://twitter.com/arphp)

[![](https://raw.githubusercontent.com/khaled-alshamaa/ar-php/master/ar-php_256.png)](https://raw.githubusercontent.com/khaled-alshamaa/ar-php/master/ar-php_256.png)

Ar-PHP Project ([ar-php.org](http://www.ar-php.org/en_index-php-arabic.html))
=============================================================================

[](#ar-php-project-ar-phporg)

#### *PHP Speaks Arabic - Be Ready!*

[](#php-speaks-arabic---be-ready)

*Copyright © 2006-2021 Khaled Al-Sham'aa.*

[![DOI](https://camo.githubusercontent.com/e427f3fbc2d7f91ac7a18cf217142943ae56979ebbab21a2e1baacd2cce16ee6/68747470733a2f2f7a656e6f646f2e6f72672f62616467652f3233313139373036332e737667)](https://zenodo.org/badge/latestdoi/231197063)

[العربية](https://github.com/khaled-alshamaa/ar-php/blob/master/README_ar.md)

### Mission &amp; Vision

[](#mission--vision)

As has happened in the Far East and Latin America, as the Internet goes to the masses, people want it in their native language.

Our mission is to develop open source solutions and provides professional support helps small and medium size companies meet the challenges of developing professional Arabic websites in the PHP/MySQL environment, the library that we develop helps our partners in save time and increase productivity.

This project provides a set of tools that enable Arabic website developers to serve professional search, present and process Arabic content in PHP.

> [Easy Installation](#quick-start)

> [List of Main Functionalities](#main-functionalities)

> [Change Log](https://github.com/khaled-alshamaa/ar-php/blob/master/CHANGELOG.md)

> [Class Documentation](https://ar-php.org/github/docs/classes/ArPHP-I18N-Arabic.html)

> [Migrating from Version 4.0](https://github.com/khaled-alshamaa/ar-php/blob/master/UPGRADE.md)

> [Contributors Logistics](https://github.com/khaled-alshamaa/ar-php/blob/master/TODO.md)

> [How to Contribute?](#how-to-contribute)

> [Professional Support](#professional-support)

### Citation

[](#citation)

If you would cite it in academic work, you can use this citation

```
K. Al-Shamaa, Ar-PHP, PHP library for website developers to process Arabic content,
https://github.com/khaled-alshamaa/ar-php, 2021

```

or in bibtex format

```
@misc{ar-php,
  title={Ar-PHP, PHP library for website developers to process Arabic content},
  author={Al-Shamaa, Khaled},
  url={https://github.com/khaled-alshamaa/ar-php},
  version = {6.2.0},
  year={2021}
}
```

### Where it has been used?

[](#where-it-has-been-used)

- [Bagisto](https://github.com/bagisto/bagisto/blob/master/README.md): Laravel package for e-commerce. \[check it out [here](https://github.com/bagisto/bagisto/blob/bf1c3f21af912800ffad5dcf68b9a486af0f6c81/packages/Webkul/Admin/src/Http/Controllers/Sales/InvoiceController.php#L159)\]
- [LimeSurvey](https://github.com/LimeSurvey/LimeSurvey/blob/master/README.md): Open-source survey software. \[[version 3.6.0](https://github.com/LimeSurvey/LimeSurvey/tree/master/application/third_party/ar-php), check it out [here](https://github.com/LimeSurvey/LimeSurvey/blob/master/application/helpers/userstatistics_helper.php#L134) and [here](https://github.com/LimeSurvey/LimeSurvey/blob/master/application/helpers/admin/statistics_helper.php#L133)\]
- [Laravel package for the Ar-PHP Project](https://github.com/atm-code/ar-php-laravel)

### Arabic Language

[](#arabic-language)

Worldwide Internet use has grown tremendously in recent years, most rapidly in non-English speaking regions especially in Arab world. For example, from 2000 to 2020, the online populations grew by more than 9,300 %. Meanwhile, Arabic Web content was estimated to be doubling every year. Such growth has created demand for better websites developing resources in Arabic language. However, existing websites developing resources may be unable to meet it because they primarily serve English-speaking users.

\[[Arabic language](https://en.wikipedia.org/wiki/Arabic), [Internet world stats](https://www.internetworldstats.com/stats7.htm)\]

### PHP

[](#php)

PHP is a widely-used general-purpose scripting language that is especially suited for web development and can be embedded into HTML. PHP runs more than 79% of all the top 10 million worldwide web sites a few very good examples are Facebook and Wikipedia.

\[[PHP language](https://www.php.net/), [Server-side languages report](https://w3techs.com/technologies/overview/programming_language)\]

### LGPL

[](#lgpl)

The main difference between the GPL and the LGPL is that the latter can be linked to (in the case of a library, 'used by') a non-(L)GPLed program, which may be free software or proprietary software. This non-(L)GPLed program can then be distributed under any chosen terms if it is not a derivative work.

\[[LGPL](http://www.gnu.org/licenses/lgpl-3.0.html), [GNU FAQ](http://www.gnu.org/licenses/gpl-faq.html)\]

### History

[](#history)

[![](https://user-images.githubusercontent.com/11270404/129626204-d354e794-bfbf-4f3c-bc22-27e7fc252701.png)](https://darshoaa.com/pHP-and-Arabic-language/)

- PHP 7 at [GitHub.com](https://github.com/khaled-alshamaa/ar-php) starting in 2020.
- PHP 5 at [SourceForge.net](https://sourceforge.net/projects/ar-php/) 2008-2016.
- PHP 4 at [PHPClasses.org](https://www.phpclasses.org/browse/author/189864.html) 2006-2008.

[![محاضرة افتتاحية عن تجربة بناء ادوات لدعم اللغة العربية و المشاريع مفتوحة المصدر - خالد الشمعة](https://camo.githubusercontent.com/7d8dc5a8ccbea64bb20088e24bf82dc64fe761dc5d1d38c258eebfa3a27e4b0a/68747470733a2f2f696d672e796f75747562652e636f6d2f76692f50347a56314975355163452f302e6a7067)](https://www.youtube.com/watch?v=P4zV1Iu5QcE)

[Top](#ar-php-project-ar-phporg)

*Quick Start*
-------------

[](#quick-start)

### Install with Composer

[](#install-with-composer)

To install with [Composer](https://getcomposer.org/), simply require the latest version of this package.

```
composer require khaled.alshamaa/ar-php
```

Make sure that the autoload file from Composer is loaded.

```
// somewhere early in your project's loading, require the Composer autoloader
// see: http://getcomposer.org/doc/00-intro.md
require 'vendor/autoload.php';
```

### Download and Install

[](#download-and-install)

Download the [latest release](https://github.com/khaled-alshamaa/ar-php/releases/latest) of Ar-PHP library and extract it into the directory where it will be used.

```
require_once 'ar-php/src/Arabic.php';
```

### Main Functionalities

[](#main-functionalities)

- Arabic Sentiment Analysis ([live demo 1](https://ar-php.org/github/examples/ar_sentiment.php), [live demo 2](https://ar-php.org/github/examples/ar_sentiment.html))
- English-Arabic Transliteration ([live demo 1](https://ar-php.org/github/examples/ar_transliteration.php), [live demo 2](https://ar-php.org/github/examples/en_transliteration.php))
- Spell Numbers in the Arabic Idiom ([live demo](https://ar-php.org/github/examples/numbers.php))
- Arabic Glyphs to Render Arabic Text ([live demo](https://ar-php.org/github/examples/ar_glyphs.php))
- Arabic Keyboard Swapping Language ([live demo](https://ar-php.org/github/examples/keyswap.php))
- Arabic Soundex ([live demo](https://ar-php.org/github/examples/soundex.php))
- Arabic Gender Guesser ([live demo](https://ar-php.org/github/examples/gender.php))
- Arabic SQL Queary ([live demo](https://ar-php.org/github/examples/ar_query.php))
- Muslim Prayer Times &amp; Qibla Determination ([live demo](https://ar-php.org/github/examples/salat.php))
- Arabic/Hijri Date ([live demo](https://ar-php.org/github/examples/date.php))
- Arabic/Hijri Maketime ([live demo](https://ar-php.org/github/examples/mktime.php))
- Arabic StrToTime ([live demo](https://ar-php.org/github/examples/strtotime.php))
- Arabic Text Standardize ([live demo](https://ar-php.org/github/examples/standard.php))
- Arabic Auto Summarize ([live demo](https://ar-php.org/github/examples/ar_summarize.php))
- Arabic Segments Identifier ([live demo](https://ar-php.org/github/examples/identifier.php))

[Top](#ar-php-project-ar-phporg)

*How to Contribute?*
--------------------

[](#how-to-contribute)

We always welcome new contributors – especially new programmers. But no matter what your skills and interests are, there is a place where you can participate to improve Ar-PHP project:

- **Programming:** Here are some ideas for contribution: Review the To-Dos, add a feature, contribute to a core module, create an extension, and fix a bug.
- **Quality Assurance:** Quality Assurance (QA) is one of the most important but understated elements of any software community project. It is also something most people can do. If you want to help fix Ar-PHP bugs, and you are not a programmer, you can still help by joining the QA team.
- **Writing:** One of the best ways to contribute to Ar-PHP is to write tutorials, guides, HOWTOs and FAQs. Here are some ideas for contribution: User FAQs, HOW-Tos and Tutorials, User Guide, Development Primer, Blog Posts, and Article for a Magazine.
- **Marketing:** You can always help promote the use of Ar-PHP. Here are two ways you can help: Join the marketing events, distribute Ar-PHP, and Ar-PHP brochure.
- **Graphics and Art:** Have any art skills? Then you can help us create icons, logos, banners, labels, wallpapers, screen savers, and more! These will be seen every day and used throughout the project and its products.
- **Helping Users:** There are two ways you can help other users: Users mailing list, and forums.
- **Celebrate with us!** Your task is to take a picture of yourself supporting PHP and Arabic language project. You can go to a famous landmark, your favorite place nearby, or anywhere you think will make for a great photo. We've created some posters for you to use in your pictures. Print out one of these designs or design your own. We want to see you and your location prominently displayed in the picture, so don't let one of them dominate the photo. And we should clearly see your Ar-PHP poster too. Once you have your photos ready to submit, email them to us. Please send your photos in .jpg or .png formats and at least 1200 x 800 pixels in size.

[Top](#ar-php-project-ar-phporg)

*Professional Support*
----------------------

[](#professional-support)

As the developers of Ar-PHP project, we can help your company leverage the maximum power of Ar-PHP to achieve your business goals. We offer professional services that span the full life-cycle of Ar-PHP implementation.

- **Ar-PHP Library Integration:** Having trouble getting started with Ar-PHP? We can help.
- **Ar-PHP Upgrades:** For smooth upgrade to a newer version of Ar-PHP, let us assist you.
- **Customization and Configuration:** If your business requires functionality beyond or different from that of the feature set of Ar-PHP, our team of PHP and Arabic language experts can fully tailor Ar-PHP to meet your specific business needs.
- **Integration Analysis and Implementation:** Arabic localization may be just a component of your entire online business operation. We have the knowledge and experience to integrate Ar-PHP with all the arms of your operation.
- **Troubleshooting, Optimization and Performance Tuning:** For increased performance and bottleneck resolution let an Ar-PHP expert look under the hood of your Ar-PHP implementation and server environment.
- **Consulting:** At any point in the implementation of Ar-PHP you can call upon a Ar-PHP expert to verify that your implementation follows industry best practices.
- **Training:** Get comprehensive training for Ar-PHP.

[Top](#ar-php-project-ar-phporg)

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 98.6% 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 ~84 days

Recently: every ~60 days

Total

8

Last Release

1685d ago

Major Versions

v5.5.2 → v6.0.02021-02-15

PHP version history (2 changes)v5.0PHP &gt;=5.3.0

v5.5.1PHP &gt;=5.6.0

### Community

Maintainers

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

---

Top Contributors

[![khaled-alshamaa](https://avatars.githubusercontent.com/u/11270404?v=4)](https://github.com/khaled-alshamaa "khaled-alshamaa (291 commits)")[![saber13812002](https://avatars.githubusercontent.com/u/3294604?v=4)](https://github.com/saber13812002 "saber13812002 (2 commits)")[![atefBB](https://avatars.githubusercontent.com/u/10966925?v=4)](https://github.com/atefBB "atefBB (1 commits)")[![devansh-webkul](https://avatars.githubusercontent.com/u/68321766?v=4)](https://github.com/devansh-webkul "devansh-webkul (1 commits)")

---

Tags

arabicarabic-sentimentarabic-numbersarabic-glyphsarabic-calendararabic-sql-queryarabic-segments-identifier

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/saber13812002-persian-php/health.svg)

```
[![Health](https://phpackages.com/badges/saber13812002-persian-php/health.svg)](https://phpackages.com/packages/saber13812002-persian-php)
```

###  Alternatives

[khaled.alshamaa/ar-php

Set of functionalities enable Arabic website developers to serve professional search, present and process Arabic content in PHP

3312.5M25](/packages/khaledalshamaa-ar-php)[still-code/ar-php-laravel

ar-php-laravel

386.1k](/packages/still-code-ar-php-laravel)[yemenifree/laravel-arabic-numbers-middleware

auto transforms arabic/eastern to eastern/arabic numbers for i.e ١٢٣٤٥٦٧٨ to 12345678

18135.4k](/packages/yemenifree-laravel-arabic-numbers-middleware)[fisharebest/ext-calendar

Implementation of the Arabic (Hijri), French, Gregorian, Jewish, Julian and Persian (Jalali) calendars. Also provides a replacement for the PHP ext/calendar extension.

36473.2k8](/packages/fisharebest-ext-calendar)[ab-alselwi/laravel-arabic-html

Convert laravel view to arabic html (pdf) by using ArPHP and dompdf with arabic fonts and text.

3528.7k](/packages/ab-alselwi-laravel-arabic-html)[arutil/ar-php

Arabic php utilities from Khaled Al-Sham'aa's library http://ar-php.org/

1735.1k](/packages/arutil-ar-php)

PHPackages © 2026

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