3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $text = 'بيتر هو صبي.'; // arabic if(mb_ereg('[\x{0600}-\x{06FF}]', $text)) // arabic range //if(mb_ereg('[\x{0590}-\x{05FF}]', $text)) // hebrew range { echo "Text has some arabic/hebrew characters."; } else { echo "Text doesnt have arabic/hebrew characters."; }
based on sJmL2
Output for 5.6.0 - 7.2.6
Text has some arabic/hebrew characters.