$ composer require cobraprojects/ar-php
<?php
use CobraProjects\Arabic\Arabic;
$Arabic = new Arabic('Glyphs');
$text ="";
$text = $Arabic->utf8Glyphs($text);
My application producing Images using GD extension and these images conatain arabic phrases, but GD cannot understand how to connect these phrases letters , So this great library helped me to solve this problem.
For more support in using arabic language in php, I think this site deserve a visit: PHP Arabic -- Ar-PHP