3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $s = 'islamic-sources'; parts_convertor($s); function parts_convertor($s){ $arr = array ( 'affiliate-sections' => 'بخش های وابسته', 'islamic-sources' => 'منابع اسلامی', 'dictionaries' => 'لغت نامه ها', 'sentences' => 'جملات', 'dream-interpretation' => 'تعبیر خواب', 'proverbs' => 'ضرب المثل ها', 'poetry' => 'اشعار' ); $s = $arr[$s]; return $s; } echo $s;
based on HNeAK
Output for 4.3.0 - 7.2.6
islamic-sources