Replace Arabic numbers with Persian numbers
<?php
$res = PersianChar::ar_numbers('۱۲۳۴1234١٢٣٤')
// ۱۲۳۴1234۱۲۳۴Replace English numbers with Persian numbers
<?php
$res = PersianChar::en_numbers('۱۲۳۴1234١٢٣٤')
// ۱۲۳۴۱۲۳۴١٢٣٤Replace both Arabic and English numbers with Persian numbers
<?php
$res = PersianChar::numbers('۱۲۳۴1234١٢٣٤')
// ۱۲۳۴۱۲۳۴۱۲۳۴Replace both Arabic and English numbers with Persian numbers
<?php
$res = PersianChar::fa_to_en_numbers('۱۲۳۴1234١٢٣٤')
// 123412341234Replace none Persian character with Persian character. This method covers most character in Arabic character table.
<?php
$res = PersianChar::letters('ؠک مټن تﺴت')
// یک متن تستNote that this method will also remove non printable characters like U+200F
php composer.phar require intuxicated/persian-text '~1.0@dev'git clone https://github.com/intuxicated/PersianChar.gitRemove namespace Intuxicated\PersianChar; if your code doesn't support php namespace