faqts : Computers : Programming : Languages : PHP : kms

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

12 of 32 people (38%) answered Yes
Recently 1 of 10 people (10%) answered Yes

Entry

Is there a way to multithread functions in a script?

Nov 28th, 2000 23:41
Pavel Prishivalko, Jason Borden,


Unfortunatelly, no easy way to do it.
Maybe, you can experiment loading script into itself with different
parameter and storing data in session?
script.php:
<?
	session_start();
	$z = file("http://localhost/script.php?id=2");
	$z = file("http://localhost/script.php?id=3");
	// Hey! We got a kinda of 3 threads :)
?>
etc...
(most likely session will not work 'cause it's cookie-based, at least
you can implement cookie-storing mechanism in script, but is it really
worth it? :)
And we have here execution time limit - default, as I can rememeber, is
30 seconds :(