mirror of
https://github.com/php/php-src.git
synced 2024-11-25 19:05:31 +08:00
Use the constant instead of string for locale type.
This commit is contained in:
parent
be0a6f4949
commit
725b3573be
@ -4,7 +4,7 @@ Locale settings affecting float parsing
|
||||
<?php # try to activate a german locale
|
||||
$status = false;
|
||||
foreach(array("de_DE", "de", "german", "ge") as $lang) {
|
||||
if($lang == setlocale("LC_ALL", $lang)) {
|
||||
if($lang == setlocale(LC_ALL, $lang)) {
|
||||
$status = true;
|
||||
continue;
|
||||
}
|
||||
@ -17,12 +17,13 @@ if(!$status) print "skip";
|
||||
<?php
|
||||
# try to activate a german locale
|
||||
foreach(array("de_DE", "de", "german", "ge") as $lang) {
|
||||
if($lang == setlocale("LC_ALL", $lang)) {
|
||||
if($lang == setlocale(LC_ALL, $lang)) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
echo (float)"3.14";
|
||||
echo (float)"3.14", "\n";
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
3.14
|
||||
|
Loading…
Reference in New Issue
Block a user