Closed
Description
Description
The following code:
<?php
declare(strict_types=1);
try{
setlocale(LC_ALL, 0,"0"); // 2nd argument is a strict_types violation
}finally{
setlocale(LC_ALL, "0",0); // 3rd argument is a strict_types violation
}
Resulted in this output:
But I expected this output instead:
Uncaught TypeError: setlocale(): Argument #2 ($locales) must be of type string, int given in /in/dqfQT:4
Uncaught TypeError: setlocale(): Argument #3 ($rest) must be of type string, int given in /in/dqfQT:6
PHP Version
PHP8.4.8
Operating System
WSL Ubuntu 24.04