php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #8291 retval of setlocale()
Submitted: 2000-12-16 07:55 UTC Modified: 2000-12-18 08:49 UTC
From: cynic at mail dot cz Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 4.0.3pl1 OS: *
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: cynic at mail dot cz
New email:
PHP Version: OS:

 

 [2000-12-16 07:55 UTC] cynic at mail dot cz
shouldn't setlocale() return the OLD value? that makes much sense to me since there's no getlocale(), and ini_set() and such behave that way.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-12-17 12:20 UTC] sniper@php.net
Please read the manual page:

http://www.php.net/setlocale


--Jani

 [2000-12-18 08:49 UTC] cynic at mail dot cz
I've noticed it returns the current locale when called with '0' (IIRC) for locale argument. But I thought it would make more sense if it was in sync with behavior of other related functions that return the OLD value when a new value is successfully set or false on failure. (see ini_set(), set_error_handler(), error_reporting(), and possibly others.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Mon Jun 15 16:00:01 2026 UTC