2

PHP on Gentoo supports the threads USE flag. As far as I know, PHP does not support true threading; I am only aware of the ability to fork using pcntl_fork(), but this functionality is provided by the pcntl USE flag. So what exactly is the point of the threads USE flag if PHP does not support threading?

tl;dr - What purpose does the threads USE flag serve for PHP on Gentoo systems?

Richard Keller
  • 2,040
  • 2
  • 19
  • 31

1 Answers1

6

It compiles PHP with thread safety on. PHP doesn't have threads, but this is supposed to allow PHP to run in a threaded environment such as Apache's worker MPM. However, note that PHP thread safety is highly disputed.

For more information on the topic, I will shamefully plug my answer to a related question.

Amr Mostafa
  • 353
  • 2
  • 6