summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerick Rethans <derick@php.net>2002-10-23 20:35:16 +0000
committerDerick Rethans <derick@php.net>2002-10-23 20:35:16 +0000
commit31224b8923ce9b5c79978dee1050b608258c2bee (patch)
tree6f8e930d6d616bf348eb39d215dbff72484e5f71
parent3bc01b5d0b88dbf8e7f56848004a197229aec2dc (diff)
downloadphp-git-31224b8923ce9b5c79978dee1050b608258c2bee.tar.gz
- Use new setlocal semantics
-rw-r--r--tests/lang/034.phpt17
1 files changed, 4 insertions, 13 deletions
diff --git a/tests/lang/034.phpt b/tests/lang/034.phpt
index dbdcce1ccf..9b10603c83 100644
--- a/tests/lang/034.phpt
+++ b/tests/lang/034.phpt
@@ -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";