function arrayFillKeys($array) {
    print_r($array);
    $array = array_fill_keys($array, 'value');
    return ($array);
}
print_r(arrayFillKeys([4,3,2]));function arrayKeys($array) {
    print_r($array);
    return array_keys($array);
}
print_r(arrayKeys(["House" => "White", "Car" => "Black"]));$test = "Hello world";
echo str_replace("world", "Valer", $test);
// outputs: Hello Valerstrtr() simply translates the characters ONE BY ONE.$test2 = "Hello world";
echo strtr($test2, "world", "Valer");
// outputs: Heeea Valer
// because it translated l > e, o > a. (w > V, r > l, d > r)ucfirst(string)$string = "i am hungry !";
$result = ucfirst ($string);
echo $result;
// outputs :   I am hungry !ctype_upper (string text)$string = "IAMHUNGRYYYYYY";
$result = ctype_upper ($string);
echo $result;
// outputs :   1  (True)
// All characters of  "IAMHUNGRYYYYYY" in UPPERCASEstrpos(string,find,start) 
// start is optional. Specifies where to begin the search. // Find the position of the first occurrence of "lo" inside the string:
$string = "Hello world";
$result_string = strpos ($string,"lo");
echo $result_string;
//  outputs :  3strtr(string,from,to)// Replace the characters "1p" in the string with "lr":
$string = "He11o wopld";
$result_string = strtr ($string,"1p","lr");
echo $result_string;array_flip(array)$array = ["A" => 10, "B" => 20, "C" => 30, "D" => 40];
$result_array = array_flip($array);
print_r ($result_array);
// outputs : 
//    [10] => A
//    [20] => B
//    [30] => C
//    [40] => Darray_diff(array1, array2, array3, ...)$array1 = ["A" => 10, "B" => 20, "C" => 30, "D" => 40];
$array2 = ["A" => 10, "B" => 20, "C" => 30];
$result_array = array_diff($array1,$array2);
print_r ($result_array);
// outputs :  [D] => 40// The array contains only numbers and alphabets.
$morse = [
	"A" => ".-","B" => "-...","C" => "-.-.","D" => "-..",
	"E" => ".","F" => "..-.","G" => "--.","H" => "....",
	"I" => "..","J" => ".---","K" => "-.-","L" => ".-..",
	"M" => "--","N" => "-.","O" => "---","P" => ".--.",
	"Q" => "--.-","R" => ".-.","S" => "...","T" => "-",
	"U" => "..-","V" => "...-","W" => ".--","X" => "-..-",
	"Y" => "-.--","Z" => "--..",1 => ".----",2 => "..---",
	3 => "...--",4 => "....-",5 => ".....",6 => "-....",
	7 => "--...",8 => "---..",9 => "----.",0 => "-----",
];
function convert_text_to_morse($str){
	global $morse;
	$result = "";
	for ( $i = 0; $i < strlen($str); $i++ ){
		if( $str[$i] == " " ) $result .= " / ";
		else {
			$result .= $morse[strtoupper($str[$i])]." ";
		}
	}
	return $result;
}
// print_r ($morse);
echo convert_text_to_morse("Hello world");
// outputs:   .... . .-.. .-.. ---  / .-- --- .-. .-.. -.. 
echo "\n";
echo convert_text_to_morse("404 ERROR");
// outputs :   ....- ----- ....-  / . .-. .-. --- .-.