note 98814 added to function.array-change-key-case

From: Date: Fri, 09 Jul 2010 11:57:18 +0000
Subject: note 98814 added to function.array-change-key-case
Groups: php.notes 
Request: Send a blank email to php-notes+get-170810@lists.php.net to get a copy of this message
Just noticing, the post below could have taken use of the Reference Operator (&) in the foreach Loop: <?php interface Cases { const TO_LOWER = 'mb_strtolower'; const TO_UPPER = 'mb_strtoupper'; } $func_case = Cases::TO_UPPER; function change_case_recursive($func_array, $func_case){ foreach($func_array as &$func_value) if(is_array($func_value)) $func_value = change_case_recursive($func_value); else $func_value = call_user_func($func_case, $func_value); return $func_array; } ?> ---- Server IP: 69.147.83.197 Probable Submitter: 84.166.3.43 ---- Manual Page -- http://www.php.net/manual/en/function.array-change-key-case.php Edit -- https://master.php.net/note/edit/98814 Del: integrated -- https://master.php.net/note/delete/98814/integrated Del: useless -- https://master.php.net/note/delete/98814/useless Del: bad code -- https://master.php.net/note/delete/98814/bad+code Del: spam -- https://master.php.net/note/delete/98814/spam Del: non-english -- https://master.php.net/note/delete/98814/non-english Del: in docs -- https://master.php.net/note/delete/98814/in+docs Del: other reasons-- https://master.php.net/note/delete/98814 Reject -- https://master.php.net/note/reject/98814 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#170810) next »