TypePHP 编译器
https://swoole.com/aot/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.3 KiB
41 lines
1.3 KiB
--TEST--
|
|
Test setlocale() function : error condition
|
|
--INI--
|
|
error_reporting=E_ALL
|
|
--SKIPIF--
|
|
<?php
|
|
echo 'skip AOT compilation or behavior differs';
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
echo "*** Testing setlocale() : error conditions ***\n";
|
|
|
|
echo "\n-- Testing setlocale() function with invalid locale array, 'category' = LC_ALL --\n";
|
|
//Invalid array of locales
|
|
$invalid_locales = array("en_US.invalid", "en_AU.invalid", "ko_KR.invalid");
|
|
var_dump( setlocale(LC_ALL,$invalid_locales) );
|
|
|
|
echo "\n-- Testing setlocale() function with invalid multiple locales, 'category' = LC_ALL --\n";
|
|
//Invalid array of locales
|
|
var_dump( setlocale(LC_ALL,"en_US.invalid", "en_AU.invalid", "ko_KR.invalid") );
|
|
|
|
echo "\n-- Testing setlocale() function with locale name too long, 'category' = LC_ALL --";
|
|
//Invalid locale - locale name too long
|
|
var_dump(setlocale(LC_ALL,str_pad('',255,'A')));
|
|
|
|
echo "\nDone";
|
|
?>
|
|
--EXPECTF--
|
|
*** Testing setlocale() : error conditions ***
|
|
|
|
-- Testing setlocale() function with invalid locale array, 'category' = LC_ALL --
|
|
bool(false)
|
|
|
|
-- Testing setlocale() function with invalid multiple locales, 'category' = LC_ALL --
|
|
bool(false)
|
|
|
|
-- Testing setlocale() function with locale name too long, 'category' = LC_ALL --
|
|
Warning: setlocale(): Specified locale name is too long in %s on line %d
|
|
bool(false)
|
|
|
|
Done
|
|
|