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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Sun Jun 02 15:01:30 2024 UTC