Find if the installed PHP is threadsafe or nonthreadsafe?

Josh picture Josh · Apr 27, 2011 · Viewed 43k times · Source

How do I find out whether the installed version of PHP is threadsafe or not thread safe?

Please note that I'm not asking the difference between a threadsafe/non thread safe installation. I would like to find out what is installed currently.

Answer

grunk picture grunk · Apr 27, 2011

Open a phpinfo() and search for the line Thread safety. For a thread-safe build you should find enable.

As specified in the comments by Muhammad Gelbana you can also use:

  • On Windows : php -i|findstr "Thread"
  • On *nix: php -i|grep Thread