I want to perform multiple for loops at once. For loop consists of socket operations. I want to send request and get response using socket. Current problem is that first of all First for loop executes and then second one. How do I perform simultaneously ? Please explain with example. This is the code :
<?php
for($i=0;$i<1000000;$i++)
{
//Soecket operations
}
for($i=0;$i<1000000;$i++)
{
//Soecket operations
}
for($i=0;$i<1000000;$i++)
{
//Soecket operations
}
for($i=0;$i<1000000;$i++)
{
//Soecket operations
}
for($i=0;$i<1000000;$i++)
{
//Soecket operations
}
for($i=0;$i<1000000;$i++)
{
//Soecket operations
}
for($i=0;$i<1000000;$i++)
{
//Soecket operations
}
for($i=0;$i<1000000;$i++)
{
//Soecket operations
}
for($i=0;$i<1000000;$i++)
{
//Soecket operations
}
?>
How can I perform all of them at once ?
Thank you!