Req #62799 [Opn]: Parallel array processing
| From: | laruence@php.net | Date: | Sun, 12 Aug 2012 13:01:35 +0000 |
| Subject: | Req #62799 [Opn]: Parallel array processing | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-172547@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=62799&edit=1
ID: 62799
Updated by: laruence@php.net
Reported by: info at ludwig-gramberg dot de
Summary: Parallel array processing
Status: Open
Type: Feature/Change Request
Package: Arrays related
Operating System: Any
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
s ,array_map,array_walk, :)
Previous Comments:
------------------------------------------------------------------------
[2012-08-12 13:01:01] laruence@php.net
do you mean something like array_map?
http://us2.php.net/manual/en/function.array-walk.php
------------------------------------------------------------------------
[2012-08-11 19:50:54] info at ludwig-gramberg dot de
Description:
------------
Idea: an easy to use parallel processing function for arrays (or any iterable
data structure).
Example:
<?php
$arr = array(1, 2, 3, 4);
array_process_parallel($arr, function($a) { return $a+5; });
?>
Now $arr would contain the following: [6, 7, 8, 9].
The values are written back to $arr. The parameter is called by reference.
Also a array_parallel_reduce would be nice.
Test script:
---------------
$arr = array(1, 2, 3, 4);
array_process_parallel($arr, function($a) { return $a+5; });
Expected result:
----------------
[6, 7, 8, 9]
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=62799&edit=1