$string = " hello world! ";
$modifiedString = trim($string); // Trim whitespace
$modifiedString = strtoupper($modifiedString); // Convert to uppercase
$modifiedString = str_replace('WORLD', 'PHP', $modifiedString); // Replace 'WORLD' with 'PHP'
$modifiedString = str_slug($modifiedString); // (Example of making it URL-friendly - not built-in, just illustrative)
echo $modifiedString; // Output: HELLO-PHP
به عنوان مثال