i'm makin my own php cli but i need to use arabic letters
so fgets return blank value from command line input
Knowing i'm using powershell to run commands
function input(string $prompt = null) {
echo "$prompt\r\n";
$handle = fopen ("php://stdin","r");
$output = fgets ($handle);
return trim ($output);
}
var_dump(input("Enter Arabic Word: "));
terminal preview :
> php cli.php
< Enter Arabic Word:
> علي
< ""