3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = 'ahmed.'; // arabic //$text = 'פיטר הוא ילד.'; // hebrew if (preg_match('~\p{Arabic}~u', $text)) echo "Text has some arabic/hebrew characters."; else echo "Text doesnt have arabic/hebrew characters."; ?>

preferences:
55.89 ms | 402 KiB | 5 Q