note 102456 added to function.array-walk
| From: | http://alex dot moutonking dot com/wordpress at osu1 dot php dot net | Date: | Wed, 16 Feb 2011 06:49:54 +0000 |
| Subject: | note 102456 added to function.array-walk | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-177016@lists.php.net to get a copy of this message | ||
For completeness one has to mention the possibility of using this function with PHP 5.3 closures:
$names = array("D\'Artagnan", "Aramis", "Portos");
array_walk($names, function(&$n) {
$n = stripslashes($n);
});
The trap with array_walk being it doesn't return the array, instead it's modified by
reference.
----
Server IP: 69.147.83.197
Probable Submitter: 58.37.204.239
----
Manual Page -- http://www.php.net/manual/en/function.array-walk.php
Edit -- https://master.php.net/note/edit/102456
Del: integrated -- https://master.php.net/note/delete/102456/integrated
Del: useless -- https://master.php.net/note/delete/102456/useless
Del: bad code -- https://master.php.net/note/delete/102456/bad+code
Del: spam -- https://master.php.net/note/delete/102456/spam
Del: non-english -- https://master.php.net/note/delete/102456/non-english
Del: in docs -- https://master.php.net/note/delete/102456/in+docs
Del: other reasons-- https://master.php.net/note/delete/102456
Reject -- https://master.php.net/note/reject/102456
Search -- https://master.php.net/manage/user-notes.php