'php stdin input return blank value with arabic chars

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:
> علي
< ""



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source