abidarm / faker-ar-ma
Moroccan Arabic (ar_MA) locale providers for FakerPHP, using Traditional Arabic.
v1.0.1
2026-07-27 21:48 UTC
Requires
- php: ^7.4 || ^8.0
- fakerphp/faker: ^1.20
Requires (Dev)
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2026-07-27 21:55:05 UTC
README
Moroccan Arabic (ar_MA) locale providers for FakerPHP.
Data is written in Traditional Arabic (فصحى), with Morocco-specific names, places, phones, and payment details.
Installation
composer require abidarm/faker-ar-ma --dev
Usage
Because providers live under Faker\Provider\ar_MA, they work with the standard factory:
<?php require 'vendor/autoload.php'; $faker = Faker\Factory::create('ar_MA'); echo $faker->name(); // السيد محمد الفاسي echo $faker->city(); // الدار البيضاء echo $faker->region(); // جهة الدار البيضاء سطات echo $faker->phoneNumber(); // +212 6 12 34 56 78 echo $faker->mobileNumber(); // 0612345678 echo $faker->company(); // شركة العلوي ش.م.م. echo $faker->email(); // ahmed.alami@menara.ma echo $faker->iban(); // MA... echo $faker->cin(); // BE123456 echo $faker->realText(100); // Classical Arabic Markov text
Providers
| Provider | Highlights |
|---|---|
Person |
Traditional Arabic given names, Moroccan surnames, CIN |
Address |
Moroccan cities, regions (الجهات), provinces, postcodes |
PhoneNumber |
+212 / 0 formats, mobileNumber() |
Company |
Arabic company prefixes/suffixes and catchphrases |
Internet |
.ma TLDs and Moroccan free-email domains |
Payment |
Moroccan IBAN (MA) |
Color |
Arabic color names |
Text |
Traditional Arabic realText() source |
Requirements
- PHP
^7.4 \|\| ^8.0 fakerphp/faker^1.20
Development
composer install
composer test
License
This package is licensed under the MIT License.