PHP Launch Execute Files Concurrently
Posted
by Ozzy
on Stack Overflow
See other posts from Stack Overflow
or by Ozzy
Published on 2010-04-24T09:49:59Z
Indexed on
2010/04/24
9:53 UTC
Read the original article
Hit count: 279
Hi all. Basically, I was doing some testing using apache bench. The file i was testing takes 2 seconds to execute (its optimised, it connects to an external server hence the slowdown)
Basically I found that the more concurrent useres i emulated, the more executions of the file i could do per second.
Is there anyway that i can do something like this in php? :
<?php
execute_file('file.php');
execute_file('file.php');
execute_file('file.php');
execute_file('file.php');
execute_file('file.php');
?>
That would execute the file 5 times but would NOT wait for the files to finish downloading so the above example would quickly call the 5 functions then exit.
Im assuming somesort of timeout would be used?
© Stack Overflow or respective owner