|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-03-25 11:28 UTC] felipe@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Dec 04 23:00:01 2025 UTC |
Description: ------------ The documentation states that "item may be an integer value of the element or the constant name of the element." The 2nd way (passing the const name as a string) doesn't work, the returned string will always be empty (""). This may be a documentation bug. Reproduce code: --------------- jo@l33t ~> php5 -r '$l = setlocale(LC_ALL, "de_DE.utf8"); printf("%s: %s\n", $l, nl_langinfo(D_T_FMT));' de_DE.utf8: %a %d %b %Y %T %Z jo@l33t ~> php5 -r '$l = setlocale(LC_ALL, "de_DE.utf8"); printf("%s: %s\n", $l, nl_langinfo("D_T_FMT"));' de_DE.utf8: Expected result: ---------------- Both ways return de_DE.utf8: %a %d %b %Y %T %Z Actual result: -------------- Only when using the D_T_FMT const, the result is like expected.