Computing.Net > Forums > Programming > php thread programming

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

php thread programming

Reply to Message Icon

Name: osaru
Date: November 10, 2005 at 21:37:09 Pacific
OS: linux
CPU/Ram: 512mb
Comment:

I am wondering if I can create a multithreaded apps in PHP. I did that couple of times in Java, but not sure about php. If I can do that, is it safe and stable?



Sponsored Link
Ads by Google

Response Number 1
Name: SN
Date: November 11, 2005 at 06:10:22 Pacific
Reply:

Not like Java, no. You can use pcntl_fork(), which is alot like the unix fork() command, to achieve some of the same results, albeit less efficiently. It creates a new process, not a new thread.

Good luck,
-SN


0

Response Number 2
Name: osaru
Date: November 12, 2005 at 00:16:20 Pacific
Reply:

Is it true? I thought apache2 support multi-thread php. Is it like multi-thread perl?


0

Response Number 3
Name: populate
Date: November 17, 2005 at 09:14:37 Pacific
Reply:

In PHP multi thread not possible. The architecture design of PHp does not support to do so. However, you can do fork.

What purpose you would like to used multi thread. You can used session or cookie for chat or related web application.


Cheers!
Populate


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: php thread programming

JAVA/PHP database programming www.computing.net/answers/programming/javaphp-database-programming/6933.html

java threads programming www.computing.net/answers/programming/java-threads-programming/12762.html

POSIX thread on solaris www.computing.net/answers/programming/posix-thread-on-solaris/3825.html