Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change PHP_ZTS and PHP_DEBUG to bool to match their ZEND equivalents #13079

Merged
merged 3 commits into from
Jan 7, 2024

Conversation

haszi
Copy link
Contributor

@haszi haszi commented Jan 5, 2024

The constants ZEND_THREAD_SAFE and PHP_ZTS, and ZEND_DEBUG_BUILD and PHP_DEBUG are based on the same underlying values (the values of ZTS and ZEND_DEBUG respectively). Despite this, the ZEND constants are bool while their PHP equivalents are int. This PR aims to change these aliases to be of the same type, bool.

php-src included one test file that used a loose comparison with PHP_ZTS which this PR also updates to use the same format other comparisons with this constant use (i.e if (PHP_ZTS) / if (!PHP_ZTS) ).

Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add an entry to NEWS and UPGRADING?

@haszi
Copy link
Contributor Author

haszi commented Jan 6, 2024

Can you add an entry to NEWS and UPGRADING?

Would this fall under 'Core' in NEWS and 'Other Changes' or 'Backward Incompatible Changes' in UPGRADING?

@haszi
Copy link
Contributor Author

haszi commented Jan 7, 2024

I went with 'Core' and 'Backward Incompatible Changes'.

@haszi haszi requested a review from Girgias January 7, 2024 10:31
@Girgias Girgias merged commit 90800b6 into php:master Jan 7, 2024
8 checks passed
@haszi haszi deleted the Change-PHP_ZTS-and-PHP_DEBUG-to-bool branch January 7, 2024 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants