<?php
$dynamicstring = 'אָדם שָׁמַיִם';
$newstring2 = preg_replace('/\p{Mn}/u', '', $dynamicstring);
// your code goes here
PD9waHAKCiRkeW5hbWljc3RyaW5nID0gJ++sr9eT150g16nXgda4157Wt9eZ1rTXnSc7CiRuZXdzdHJpbmcyID0gcHJlZ19yZXBsYWNlKCcvXHB7TW59L3UnLCAnJywgJGR5bmFtaWNzdHJpbmcpOwp2YXJfZHVtcCgkbmV3c3RyaW5nMik7CgovLyB5b3VyIGNvZGUgZ29lcyBoZXJl