Jump to content

paralel function execution


eziitiss

Recommended Posts

The problem is that, that i want to execude a function in paralel, because it works with servers and databases. The idea is something like this:

$server = array('1.1.1.1','2.2.2.2', '3.3.3.3'.... ) //the IP's of the servers

for($a =0 ; isset($server[$a]); $a++)
{call the function, in stead of this I want to call the functions all in the same time
    myfunction($server[$a]); //this doesn't need to return anything
}

function myfunction($server)
{
   //works with servers and saves the information in database
  // but it can take to 10 sec. long
}

I work with apache 2.2.4 module PHPv5.2.0 on windows XP

Link to comment
https://forums.phpfreaks.com/topic/37453-paralel-function-execution/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.