Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is for PHP_ZTS predefined constant in PHP?

Tags:

php

There is a predefined constant PHP_ZTS available from PHP 5.2.7, but there is no documentation for it in the manual.

Can anyone explain what's its purpose?

like image 513
Dmytro Danylevskyi Avatar asked Jan 10 '15 05:01

Dmytro Danylevskyi


1 Answers

PHP_ZTS is predefined constant which returns whether Zend Thread Safety (ZTS) is enabled or not.

PHP_ZTS (return value of "0" (false) indicates compiled php is non thead safe)

Some extensions need ZTS enabled to work properly with PHP; it's enabled using the option:

--enable-maintainer-zts

at PHP build time.

like image 172
l'L'l Avatar answered Oct 28 '22 06:10

l'L'l