Edit report at https://bugs.php.net/bug.php?id=62799&edit=1

 ID:                 62799
 Updated by:         larue...@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] larue...@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

Reply via email to