|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-03-06 15:40 UTC] sniper@php.net
[2005-03-07 19:15 UTC] nlopess@php.net
[2020-02-07 06:11 UTC] phpdocbot@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 07:00:01 2025 UTC |
Description: ------------ From the documentation: string textdomain ( string text_domain ) This function sets the domain to search within when calls are made to gettext(), usually the named after an application. The previous default domain is returned. Call it with NULL as parameter to get the current setting without changing it. What actually happens: This function sets the domain to search within when calls are made to gettext(), usually the named after an application. The current default domain is returned, i.e. the domain just set. Call it with NULL as parameter to get the current setting without changing it. Reproduce code: --------------- <?php // Let's assume that the current default domain is 'A' echo textdomain(NULL); echo $orig = textdomain('B'); echo textdomain(NULL); echo textdomain('C'); echo textdomain(NULL); echo textdomain($orig); echo textdomain(NULL); ?> Expected result: ---------------- AABBCCA Actual result: -------------- ABBCCBB