derick Wed Oct 23 16:35:16 2002 EDT
Modified files:
/php4/tests/lang 034.phpt
Log:
- Use new setlocal semantics
Index: php4/tests/lang/034.phpt
diff -u php4/tests/lang/034.phpt:1.5 php4/tests/lang/034.phpt:1.6
--- php4/tests/lang/034.phpt:1.5 Thu Oct 10 15:52:13 2002
+++ php4/tests/lang/034.phpt Wed Oct 23 16:35:16 2002
@@ -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";
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php