Skip to content

Commit

Permalink
- Use new setlocal semantics
Browse files Browse the repository at this point in the history
  • Loading branch information
Derick Rethans committed Oct 23, 2002
1 parent 3bc01b5 commit 31224b8
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions tests/lang/034.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,16 @@
Locale settings affecting float parsing
--SKIPIF--
<?php # try to activate a german locale
$status = false;
foreach(array("de_DE", "de", "german", "ge") as $lang) {
if($lang == setlocale(LC_NUMERIC, $lang)) {
$status = true;
continue;
}
if (setlocale(LC_NUMERIC, "de_DE", "de", "german", "ge") === FALSE) {
print "skip";
}
if(!$status) print "skip";
?>
--POST--
--GET--
--FILE--
<?php
# try to activate a german locale
foreach(array("de_DE", "de", "german", "ge") as $lang) {
if($lang == setlocale(LC_NUMERIC, $lang)) {
continue;
}
}
# activate the german locale
setlocale(LC_NUMERIC, "de_DE", "de", "german", "ge");

echo (float)"3.14", "\n";

Expand Down

0 comments on commit 31224b8

Please sign in to comment.