php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #9200 strtolower handle arrays in addition to strings
Submitted: 2001-02-09 19:29 UTC Modified: 2002-04-28 19:19 UTC
From: ben at efros dot com Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 4.0.4pl1 OS: linux
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: ben at efros dot com
New email:
PHP Version: OS:

 

 [2001-02-09 19:29 UTC] ben at efros dot com
It would be nice to have strtolower() accept arrays as arguments (or just make a function such as ArrayToLower()).  For example:

$OUT["SomECapital"]="Whatever This Doesn't Matter";
echo $OUT["SomECapital"]; /* Works as expected */
$newOUT=strtolower($OUT);
/*

Currently the above line puts "Array" into $newOUT (like expected) , instead make this convert indexes with uppercase letters into lower case, so the line below would work and output the string "Whatever This Doesn't Matter"

*/
echo $newOUT["somecapital"];


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-04-28 19:19 UTC] jimw@php.net
you can use array_map() to apply a function to an array like this.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue May 06 22:01:28 2025 UTC