php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #66962 CLI ignores setlocale regarding number conversion
Submitted: 2014-03-26 19:07 UTC Modified: 2014-03-27 09:54 UTC
From: cpuidle at gmx dot de Assigned:
Status: Duplicate Package: CGI/CLI related
PHP Version: 5.5.10 OS: Win7 32bit
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
33 + 49 = ?
Subscribe to this entry?

 
 [2014-03-26 19:07 UTC] cpuidle at gmx dot de
Description:
------------
CLI ignores number formatting when locales are set

Gives in browser:
German_Germany.1252 3,1412592

Gives in CLI:
German_Germany.1252 3.1412592

Test script:
---------------
<?php
echo(setlocale(LC_ALL,array('de_DE','deu_deu'))."\n");
$p = 3.1412592;
echo((string)$p);

Expected result:
----------------
3,1412592

Actual result:
--------------
3.1412592

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-03-27 09:54 UTC] ab@php.net
-Status: Open +Status: Duplicate
 [2014-03-27 09:54 UTC] ab@php.net
see bug #65230
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 06:01:28 2024 UTC