Bug #79977 [NEW]: Compatibily with locale

From: Date: Fri, 14 Aug 2020 19:37:03 +0000
Subject: Bug #79977 [NEW]: Compatibily with locale
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-228595@lists.php.net to get a copy of this message
From:             xyz at ed48 dot com
Operating system: Windows
PHP version:      8.0.0beta1
Package:          Arrays related
Bug Type:         Bug
Bug description:Compatibily with locale

Description:
------------
In PHP 7.4.9 the script runs with no problem, however, in PHP 8.0.0
beta1, it does not obey LOCALE.

Test script:
---------------
<?php
$arr01 = [ 2.876, 8.0, 18.91, 32.12 ];
echo 'The given ARRAY:<br>';
print_r($arr01);
echo '<br><br>The SUM:<br>';
setlocale(LC_NUMERIC, 'pt-pt', 'pt_PT');
$sarr01 = array_sum($arr01);
echo $sarr01 . '<br>';
?> 

Expected result:
----------------
61,906 

Actual result:
--------------
The SUM (PHP 7.4.9):
61,906 

The SUM (PHP 8.0.0 b1):
61.906

-- 
Edit bug report at https://bugs.php.net/bug.php?id=79977&edit=1
-- 
Fix committed:                    https://bugs.php.net/fix.php?id=79977&r=fixed
Fixed in release:                 https://bugs.php.net/fix.php?id=79977&r=alreadyfixed
Need backtrace:                   https://bugs.php.net/fix.php?id=79977&r=needtrace
Need Reproduce Script:            https://bugs.php.net/fix.php?id=79977&r=needscript
Try newer version:                https://bugs.php.net/fix.php?id=79977&r=oldversion
Not developer issue:              https://bugs.php.net/fix.php?id=79977&r=support
Expected behavior:                https://bugs.php.net/fix.php?id=79977&r=notwrong
Not enough info:                  https://bugs.php.net/fix.php?id=79977&r=notenoughinfo
Submitted twice:                  https://bugs.php.net/fix.php?id=79977&r=submittedtwice
register_globals:                 https://bugs.php.net/fix.php?id=79977&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=79977&r=phptooold
Daylight Savings:                 https://bugs.php.net/fix.php?id=79977&r=dst
IIS Stability:                    https://bugs.php.net/fix.php?id=79977&r=isapi
Install GNU Sed:                  https://bugs.php.net/fix.php?id=79977&r=gnused
Floating point limitations:       https://bugs.php.net/fix.php?id=79977&r=float
No Zend Extensions:               https://bugs.php.net/fix.php?id=79977&r=nozend
MySQL Configuration Error:        https://bugs.php.net/fix.php?id=79977&r=mysqlcfg


Thread (2 messages)

« previous php.bugs (#228595) next »