|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62127 array_change_key_case first letter
Submitted: 2012-05-23 17:03 UTC Modified: 2012-05-24 10:19 UTC
From: michael at hscbrasil dot com dot br Assigned:
Status: Not a bug Package: Arrays related
PHP Version: Irrelevant OS: CentOS 5.5
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.
Block user comment
Status: Assign to:
Bug Type:
From: michael at hscbrasil dot com dot br
New email:
PHP Version: OS:


 [2012-05-23 17:03 UTC] michael at hscbrasil dot com dot br
I was trying to use array_change_key_case to convert Array keys to a Lower Case. An error occurs in keys with accent on the first letter.

PHP Version 5.2.10

Test script:
$arr = array
	'Última Atualização' => 'Última Atualização',
	'IP' => 'IP',
	'Ônibus' => 'Ônibus',
	'MSN' => 'MSN'

print 'normal = '.var_export($arr, true);

print 'lower = '.var_export(array_change_key_case($arr, CASE_LOWER), true);

normal = array (
  'Última Atualização' => 'Última Atualização',
  'IP' => 'IP',
  'Ônibus' => 'Ônibus',
  'MSN' => 'MSN',
lower = array (
  'Última atualização' => 'Última Atualização',
  'ip' => 'IP',
  'Ônibus' => 'Ônibus',
  'msn' => 'MSN',


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2012-05-24 10:19 UTC]
-Status: Open +Status: Not a bug
 [2012-05-24 10:19 UTC]
Set a proper locale using setlocale() also 5.2.10 is out of support for long
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Apr 22 17:01:24 2021 UTC